generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (69 loc) · 2.39 KB
/
ci.yaml
File metadata and controls
69 lines (69 loc) · 2.39 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
pull_request:
push:
branches:
- 'main'
jobs:
build:
name: Build binaries
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make release-build
test:
name: Small tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make test
- run: make check-generate
- run: make envtest
e2e:
name: End-to-End Tests
strategy:
matrix:
k8s-version:
- v1.35.0@sha256:4613778f3cfcd10e615029370f5786704559103cf27bef934597ba562b269661 # renovate: kindest/node
- v1.34.3@sha256:08497ee19eace7b4b5348db5c6a1591d7752b164530a36f855cb0f2bdcbadd48 # renovate: kindest/node
- v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 # renovate: kindest/node
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
cache: true
- uses: ./.github/actions/aqua
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make start KUBERNETES_VERSION=${{ matrix.k8s-version }}
working-directory: e2e
- run: make test
working-directory: e2e
- run: make logs
working-directory: e2e
if: always()
- name: Sanitize version name
id: sanitize
run: |
# extract only version name because ':' is not allowed for artifact name
SANITIZED_K8S_VERSION="$(echo ${{ matrix.k8s-version}} | awk -F '@' '{print $1}')"
echo "SANITIZED_K8S_VERSION=$SANITIZED_K8S_VERSION" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: logs-${{ steps.sanitize.outputs.SANITIZED_K8S_VERSION }}.tar.gz
path: e2e/logs.tar.gz