-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 939 Bytes
/
tests.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
43
44
---
name: Tests
on:
push:
tags:
- '*'
branches:
- master
- 'release/v[0-9].[0-9]'
pull_request:
branches:
- master
- 'release/v[0-9].[0-9]'
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
check-latest: true
- name: Run unit-tests
run: go test -covermode count --coverprofile coverage.out -coverpkg=./... ./... -v
- name: Check coverage
run: go tool cover -func coverage.out
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: dnsmasq-manager
file: ./coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true