-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (46 loc) · 1.14 KB
/
tests.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
name: Tests
on:
push:
branches: [ main ]
pull_request:
paths:
- 'src/**.go'
- 'go.mod'
- .github/workflows/tests.yml
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run quality checks and test code
run: task ci
- name: Upload Coverage
uses: codecov/codecov-action@v5
with:
files: ./src/coverage.txt
fail_ci_if_error: false
verbose: true