-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.45 KB
/
pr.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
name: Check pull request
on: pull_request
jobs:
test:
name: Check pull request
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: docker compose up bigquery -d
- uses: asdf-vm/actions/setup@v3
- id: asdf-cache
uses: actions/cache@v4
with:
path: ~/.asdf/
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
- uses: asdf-vm/actions/install@v3
if: steps.asdf-cache.outputs.cache-hit != 'true'
with:
before_install: |
asdf install golang latest
asdf global golang latest
- name: Find go cache dir
id: go-cache
run: |
go version
# Clear cache dirs to avoid error when restoring
go clean -cache -modcache
echo "gocache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "gomodcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- name: Cache go modules
uses: actions/cache@v4
with:
path: |
${{ steps.go-cache.outputs.gocache }}
${{ steps.go-cache.outputs.gomodcache }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- run: make test-with-cc
- run: helm lint --strict ./charts
- run: make staticcheck
- run: make vulncheck
- name: Check code format and run code generators
run: |
make fmt
make generate
git diff --exit-code --name-only