-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 975 Bytes
/
ci-cover.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: CI Cover
on:
push:
tags:
- 'v*'
jobs:
# Test on various OS with default Go version.
tests:
name: Test on ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go-version: ['1.20.x']
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Print Go version
run: go version
- name: Get dependencies
run: go get -v -t -d ./...
- name: Run tests
run: go test -v -failfast -tags=test -timeout="3m" -coverprofile="./coverage.out" -covermode="atomic" ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
flags: unittests
name: codecov-umbrella
verbose: true