-
Notifications
You must be signed in to change notification settings - Fork 65
42 lines (42 loc) · 1.02 KB
/
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
name: Test
on:
- pull_request
- push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
unit:
runs-on: ubuntu-latest
name: "Go ${{ matrix.go }} Test"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: stable
- run: make test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "stable"
- uses: dominikh/staticcheck-action@v1
with:
build-tags: suite
install-go: false
integration:
needs:
- unit
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "stable"
- run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
source <(setup-envtest use -p env)
go test ./... -tags suite