-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.03 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: test
on:
push:
branches:
- '**'
jobs:
test:
name: test
runs-on: ubuntu-latest
services:
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- 3306:3306
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
MSSQL_SA_PASSWORD: "Password123"
ACCEPT_EULA: "Y"
ports:
- 1433:1433
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup Golang
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: get dependencies
run: go get -v -t -d ./...
- name: test code
run: go test ./...