-
Notifications
You must be signed in to change notification settings - Fork 373
61 lines (51 loc) · 1.16 KB
/
go.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
50
51
52
53
54
55
56
57
58
59
60
61
name: Go
on:
push:
branches:
- main
- v3
pull_request:
branches:
- main
- v3
jobs:
integration-tests:
runs-on: ubuntu-latest
container: golang:1.18
services:
postgres:
image: postgres
env:
POSTGRES_DB: gorptest
POSTGRES_USER: gorptest
POSTGRES_PASSWORD: gorptest
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: gorptest
MYSQL_USER: gorptest
MYSQL_PASSWORD: gorptest
MYSQL_RANDOM_ROOT_PASSWORD: true
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v3
- name: Integration Tests
run: ./test_all.sh
quick-tests:
runs-on: ubuntu-latest
container: golang:1.18
steps:
- uses: actions/checkout@v3
- name: Go Build
run: go build -v ./...
- name: Unit Tests
run: go test -v ./...