Skip to content

Commit

Permalink
Run tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dfava authored Oct 15, 2024
1 parent 81b8182 commit afc5292
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: go-querysql-test

on:
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Start db
run: docker compose -f docker-compose.test.yml up -d

- name: Test
run: go test -v ./...
15 changes: 15 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
#
# mssql
#
mssql:
image: mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04

hostname: mssql
container_name: mssql
network_mode: bridge
ports:
- "1433:1433"
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: VippsPw1

0 comments on commit afc5292

Please sign in to comment.