-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (42 loc) · 1.24 KB
/
ci.yaml
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
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5
with:
go-version: "1.22"
# see https://github.com/actions/setup-go?tab=readme-ov-file#caching-dependency-files-and-build-outputs
cache-dependency-path: |
go.sum
- name: Checkout Repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
- name: Get dependencies
run: go mod download
- name: Build
run: make
- name: Run Unit-Tests
run: make test-parallel
- name: Generate code coverage artifacts
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: cover.out
- name: Upload code coverage information to codecov.io
uses: codecov/[email protected]
with:
file: cover.out
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}