-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.21 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
name: tests
on:
push:
branches: ['*']
paths-ignore: ['**.md']
pull_request:
types: [opened, synchronize, labeled, reopened, synchronize, ready_for_review]
paths-ignore: ['**.md']
jobs:
test-build:
strategy:
matrix:
go-version: [1.21.x, 1.20.x]
os: [ubuntu-latest, macos-latest]
include:
# include windows-latest for latest go version only
# windows execution is quiet slow on Github runners.
- go-version: 1.21.x
os: windows-latest
runs-on: ${{ matrix.os }}
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: 0
- name: Check go modules
run: go mod tidy && git diff -s --exit-code go.sum
- name: Run linters
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
args: -v --timeout=5m --issues-exit-code=0
- name: Run Tests
run: make test-cover
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}