-
-
Notifications
You must be signed in to change notification settings - Fork 58
80 lines (80 loc) · 2.38 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [master, dev]
pull_request:
# The branches below must be a subset of the branches above
branches: [master, dev]
jobs:
lint:
strategy:
fail-fast: false # dont' want one scenario failing to deprive us of feedback on the others
matrix:
go-version: [1.18.x, 1.19.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Lint
run: go run utils/ci.go lint
if: matrix.os == 'ubuntu-latest'
test:
strategy:
fail-fast: false # dont' want one scenario failing to deprive us of feedback on the others
matrix:
go-version: [1.18.x, 1.19.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: go run utils/ci.go build
- name: Test
run: go run utils/ci.go test --integration -v
# TODO: these mysql test currently bypass the end-to-end test pattern effectively testing only that configuration is loaded
# mysqltest:
# strategy:
# fail-fast: false # dont' want one scenario failing to deprive us of feedback on the others
# matrix:
# go-version: [1.14.x, 1.15.x]
# os: [ubuntu-latest]
# runs-on: ${{ matrix.os }}
# services:
# mysql:
# image: mysql:5.7
# env:
# MYSQL_USER: godbledger
# MYSQL_PASSWORD: password
# MYSQL_DATABASE: ledger
# MYSQL_ROOT_PASSWORD: password
# ports:
# - 3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s
# steps:
# - name: Verify MySQL connection
# env:
# PORT: ${{ job.services.mysql.ports[3306] }}
# run: |
# while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
# sleep 1
# done
# - name: Install Go
# uses: actions/setup-go@v2
# with:
# go-version: ${{ matrix.go-version }}
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Build
# run: go run utils/ci.go build
# - name: Test
# run: go run utils/ci.go test --mysql -v