-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (55 loc) · 1.52 KB
/
ci.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
on: [push]
name: CI
jobs:
test:
env:
GOPATH: ${{ github.workspace }}
GO111MODULE: off
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
strategy:
matrix:
go-version: [1.22.x]
services:
postgres:
image: "postgres:12"
env:
POSTGRES_PASSWORD: morph
POSTGRES_DB: morph_test
POSTGRES_USER: morph
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6432:5432
mysql:
image: "mysql:8"
env:
MYSQL_DATABASE: morph_test
MYSQL_USER: morph
MYSQL_PASSWORD: morph
MYSQL_ROOT_PASSWORD: morph # Set health checks to wait until mysql has started
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
ports:
- 3307:3306
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout Code
uses: actions/checkout@v2
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Execute Tests
run: | # we run driver and rest tests at the same time
make test