-
Notifications
You must be signed in to change notification settings - Fork 85
55 lines (49 loc) · 1.25 KB
/
go.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
name: Run Tests and Build
on:
push: {}
pull_request: {}
env:
CI: true
GO111MODULE: on
GOPROXY: https://proxy.golang.org
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.21]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Set GOPATH and PATH
run: |
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
shell: bash
- name: Install dependencies
run: |
make download-dependencies
- name: Lint
run: |
make lint
- name: Run gofmt
run: |
diff -u <(echo -n) <(gofmt -d -e .)
- name: Run go vet
run: |
make go-vet
- name: Build plugin
run: |
make build
- name: Test
run: |
# Github now comes with kustomize already installed
sudo rm $(command -v kustomize) || true
make kustomize
XDG_CONFIG_HOME=$HOME/.config make test