-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.16 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
43
44
45
46
---
name: Tests
on: [pull_request]
jobs:
lint:
name: "Linters (go v${{ matrix.go-version }})"
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.20' ]
steps:
- name: Checkout k8s-secret-replicator
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Check formatting
run: |
test -z $(gofmt -l -s ./)
- name: Check go vet
run: |
go vet ./...
- name: Verify dependencies
run: |
go mod verify
- name: Check if plugin can be built
run: |
go build -v .
unit-test:
name: "Unit tests (go v${{ matrix.go-version }})"
needs: lint
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.20' ]
steps:
- name: Checkout k8s-secret-replicator
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run unit tests
run: |
go test -v ./...