-
Notifications
You must be signed in to change notification settings - Fork 45
78 lines (68 loc) · 1.89 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Tests
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
tests:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
cache-dependency-path: 'go.sum'
- name: Test
run: make test-race
- name: Reproducible build test
if: runner.os != 'Windows'
run: |
go build -o ./build/test1 ./tests/main.go
shasum -a256 ./build/test1 | awk '{ print $1 }' > test1.sha256
go build -o ./build/test2 ./tests/main.go
shasum -a256 ./build/test2 | awk '{ print $1 }' > test2.sha256
if ! cmp -s test1.sha256 test2.sha256; then
echo >&2 "Reproducible build broken"; cat test1.sha256; cat test2.sha256; exit 1
fi
govuln:
name: Run govuln check and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Running govulncheck
uses: Templum/[email protected]
continue-on-error: false
with:
go-version: 1.20.4
vulncheck-version: latest
package: ./...
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-upload: true
fail-on-vuln: true
mutating:
name: Mutation tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
cache-dependency-path: 'go.sum'
- name: Install dependencies
run: make install-deps
- name: Mutating testing
run: make mut