-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (37 loc) · 980 Bytes
/
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
name: Go package
on: [push]
jobs:
ci:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0-debian
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DB_DATABASE: test_db
DB_USER: root
DB_PASSWORD: root
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: Build
run: make build
- name: Lint
run: make lint
- name: Unit test
run: make test
- name: Start local MySQL
run: sudo systemctl start mysql
- name: MySQL Test
run: |
export PATH="$PATH:bin"
script/ci-github.sh