-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (44 loc) · 1.06 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
50
51
52
53
54
55
56
name: test
on:
push:
branches: ["main", "test", "dev", "dev/*", "dev_*"]
pull_request:
branches: ["main", "test", "dev"]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22.x]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Start external services
run: |
make up-ci-services
- name: Install dependencies
run: |
make install
- name: Format with gofmt
run: |
make format-check
- name: Import sorting with goimports
run: |
make isort-check
- name: Lint with golangci-lint
run: |
make lint
- name: Test with go test
run: |
./ci/wait-for-it.sh 127.0.0.1:3306 -s -t 60
sleep 10
make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
fail_ci_if_error: true
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}