-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (37 loc) · 1.04 KB
/
verify.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
name: lint_test_coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
name: "Lint + Tests + Coverage"
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.20', '1.21']
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run unit tests
run: |
make test-container KEEP_TEST_CONTAINER=1 GO_VERSION=${{ matrix.go-version }}
podman cp go-test-container:/app/coverage.out .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.out
flags: go-${{ matrix.go-version }}
name: coverage-go-${{ matrix.go-version }}
fail_ci_if_error: true
verbose: true