Skip to content

Commit f0635f0

Browse files
authored
Merge pull request #98 from go-gorm/ci-build-test-job-added
ci: added build & test job
2 parents 385a8da + f947e63 commit f0635f0

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
run-tests:
12+
strategy:
13+
matrix:
14+
go: ['1.19', '1.18', '1.17']
15+
platform: [ubuntu-latest]
16+
runs-on: ubuntu-latest
17+
services:
18+
mssql:
19+
image: mcmoe/mssqldocker:latest
20+
env:
21+
ACCEPT_EULA: Y
22+
SA_PASSWORD: LoremIpsum86
23+
MSSQL_DB: gorm
24+
MSSQL_USER: gorm
25+
MSSQL_PASSWORD: LoremIpsum86
26+
ports:
27+
- 9930:1433
28+
29+
steps:
30+
- name: Set up Go 1.x
31+
uses: actions/setup-go@v4
32+
with:
33+
go-version: ${{ matrix.go }}
34+
35+
- name: Check out code into the Go module directory
36+
uses: actions/checkout@v3
37+
38+
# Run build of the application
39+
- name: Run build
40+
run: go build .
41+
42+
- name: Run tests
43+
run: go test -race -count=1 -v ./...

0 commit comments

Comments
 (0)