generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.37 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
pull_request:
push:
branches:
- 'main'
env:
cache-version: 1
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: make docker-build
test:
name: Small tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make setup
- run: make fmt
- run: make vet
- run: make check-generate
- run: make test
e2e:
name: End-to-End Tests
strategy:
matrix:
k8s-version: ["1.27.13", "1.28.9", "1.29.4"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@4551ec64e21bf0f557c2525135ff0bd2cba40ec7 # v3.0.0
with:
aqua_version: v2.27.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: make setup E2ETEST_K8S_VERSION=${{ matrix.k8s-version }}
working-directory: e2e
- run: make start E2ETEST_K8S_VERSION=${{ matrix.k8s-version }}
working-directory: e2e
- run: make test
working-directory: e2e
- run: make logs
working-directory: e2e
if: always()
- uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ matrix.k8s-version }}.tar.gz
path: e2e/logs.tar.gz