-
Notifications
You must be signed in to change notification settings - Fork 84
53 lines (47 loc) · 1.23 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
name: Run Tests and Build
on: [push]
env:
CI: true
GO111MODULE: on
GOPROXY: https://proxy.golang.org
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.19]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
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