-
Notifications
You must be signed in to change notification settings - Fork 102
32 lines (32 loc) · 1.05 KB
/
test.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
name: Run tests
on: [ pull_request ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Verify manifests are up to date
run: |
kustomize build deploy/kubernetes > /tmp/hcloud-csi.yml
# Workaround for kustomize stripping all comments. This comment is
# needed to automatically bump the referenced container tag through
# release-please
sed -i '/hetznercloud\/hcloud-csi-driver/ s/$/ # x-release-please-version/' /tmp/hcloud-csi.yml
diff deploy/kubernetes/hcloud-csi.yml /tmp/hcloud-csi.yml
- name: Run tests
run: |
go vet ./...
go test $(go list ./... | grep -v e2e) -v