-
Notifications
You must be signed in to change notification settings - Fork 763
57 lines (55 loc) · 1.64 KB
/
codegen.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: Generated code
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
check-go-modules:
name: "Check for go.mod/go.sum synchronicity"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Download all Go modules
run: |
go mod download
- name: Check for tidyness of go.mod and go.sum
run: |
go mod tidy
git diff --exit-code -- .
check-sdk-codegen:
name: "Check for changes from make bundle"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run make bundle
run: |
make bundle
- name: Ensure there is no diff in bundle
# --ignore-matching-lines='.*createdAt:.*' added to ignore bundle differences of timestamp that is generated by upgraded operator-sdk
run: |
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code -- .
- name: Run make generate
run: |
make generate
- name: Ensure there is no diff in generated assets
run: |
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code -- .
- name: Run make manifests
run: |
make manifests
- name: Ensure there is no diff in manifests
run: |
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code -- .