-
Notifications
You must be signed in to change notification settings - Fork 19
69 lines (63 loc) · 1.66 KB
/
tests.yml
File metadata and controls
69 lines (63 loc) · 1.66 KB
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
name: Linting and Unit Tests
# This makes sure only one action triggers the job
on:
pull_request:
branches:
- "*"
push:
branches:
- main
jobs:
lint:
strategy:
fail-fast: false
matrix:
go:
- 23
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: 1.${{matrix.go}}.x
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.3.0
- name: Run lint checks on the source with go 1.${{matrix.go}}.x
run: make check
unit-tests:
strategy:
fail-fast: false
matrix:
go:
- 23
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 2
- uses: actions/setup-go@v6
with:
go-version: 1.${{matrix.go}}.x
- name: Run unit tests on go 1.${{matrix.go}}.x
run: make test
- name: Send coverage to codecov.io for go v1.23.x
if: matrix.go == 23
run: bash <(curl -s https://codecov.io/bash)
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: 1.23.x
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
continue-on-error: true
run: govulncheck ./...
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run build test
run: make build-in-podman