-
Notifications
You must be signed in to change notification settings - Fork 56
122 lines (94 loc) · 2.8 KB
/
pr-checks.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: checks
on:
pull_request:
jobs:
commit-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
github-actions-yaml-lint:
runs-on: ubuntu-latest
name: Github Actions yaml linter
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-actionlint@v1
lint:
runs-on: ubuntu-latest
name: Run all lints
steps:
- uses: actions/checkout@v3
- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
check-latest: true
cache: true
- name: Use tools cache
uses: ./.github/tools-cache
- name: golangci-lint
run: make lint-golang
- name: jsonnet-fmt
run: make fmt-jsonnet && git diff --exit-code
- name: jsonnet-lint
run: make lint-jsonnet
- name: shellcheck
run: make lint-shell
generate:
runs-on: ubuntu-latest
name: Generate and format
steps:
- uses: actions/checkout@v3
- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
check-latest: true
cache: true
- run: make --always-make generate && git diff --exit-code
- run: make --always-make bundle && git diff --exit-code
tool-versions:
runs-on: ubuntu-latest
name: Validate tools cache
steps:
- uses: actions/checkout@v3
- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
check-latest: true
cache: true
- name: Use tools cache
uses: ./.github/tools-cache
- run: make --always-make tools && git diff --exit-code
build-bundle-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
check-latest: true
cache: true
- name: Install tools
uses: ./.github/tools-cache
- name: Build Bundle Image
run: make bundle-image
e2e-tests-olm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV
- name: e2e tests through OLM
uses: ./.github/e2e-tests-olm
with:
go-version: ${{ env.go-version }}