@@ -19,13 +19,12 @@ jobs:
1919
2020 steps :
2121 - name : Checkout repository
22- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 .0.0
22+ uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 .0.0
2323
24- - name : Set up Nix
25- uses : cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
24+ - name : Set up Go
25+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
2626 with :
27- extra_nix_config : |
28- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
27+ go-version-file : ' .go-version'
2928
3029 - name : Set up Go cache
3130 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3736 restore-keys : |
3837 ${{ github.job }}-${{ runner.os }}-go-
3938
40- - name : Prepare Nix shell
41- run : nix develop --impure .#ci
42-
4339 - name : Build
44- run : nix develop --impure .#ci -c make build
40+ run : make build
4541
4642 test :
4743 name : Test
@@ -51,11 +47,10 @@ jobs:
5147 - name : Checkout repository
5248 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5349
54- - name : Set up Nix
55- uses : cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
50+ - name : Set up Go
51+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
5652 with :
57- extra_nix_config : |
58- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
53+ go-version-file : ' .go-version'
5954
6055 - name : Set up Go cache
6156 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
6762 restore-keys : |
6863 ${{ github.job }}-${{ runner.os }}-go-
6964
70- - name : Prepare Nix shell
71- run : nix develop --impure .#ci
72-
7365 - name : Test
74- run : nix develop --impure .#ci -c make test
66+ run : make test
7567
7668 lint :
7769 name : Lint
@@ -81,11 +73,10 @@ jobs:
8173 - name : Checkout repository
8274 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8375
84- - name : Set up Nix
85- uses : cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
76+ - name : Set up Go
77+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
8678 with :
87- extra_nix_config : |
88- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
79+ go-version-file : ' .go-version'
8980
9081 - name : Set up Go cache
9182 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -97,11 +88,25 @@ jobs:
9788 restore-keys : |
9889 ${{ github.job }}-${{ runner.os }}-go-
9990
100- - name : Prepare Nix shell
101- run : nix develop --impure .#ci
91+ - name : Make deps
92+ run : make deps
10293
103- - name : Lint
104- run : nix develop --impure .#ci -c make lint -j
94+ - name : Lint Go code
95+ run : make lint-go
96+
97+ - name : Lint Helm charts
98+ run : make lint-helm
99+
100+ - name : Run Hadolint
101+ uses : hadolint/hadolint-action@v3.3.0
102+ with :
103+ dockerfile : Dockerfile
104+ config : .hadolint.yaml
105+
106+ - name : Run Yamllint
107+ run : |
108+ pip install --user yamllint
109+ yamllint .
105110
106111 license-check :
107112 name : License check
@@ -111,11 +116,10 @@ jobs:
111116 - name : Checkout repository
112117 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
113118
114- - name : Set up Nix
115- uses : cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
119+ - name : Set up Go
120+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
116121 with :
117- extra_nix_config : |
118- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
122+ go-version-file : ' .go-version'
119123
120124 - name : Set up Go cache
121125 uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -137,39 +141,19 @@ jobs:
137141 licensei-v1-main
138142 licensei-v1
139143
140- - name : Prepare Nix shell
141- run : nix develop --impure .#ci
144+ - name : Make deps
145+ run : make deps
142146
143147 - name : Populate license cache
144- run : nix develop --impure .#ci -c licensei cache
148+ run : make license- cache
145149 env :
146150 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
147151
148152 - name : Check licenses
149- run : nix develop --impure .#ci -c make license-check
153+ run : make license-check
150154 env :
151155 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
152156
153- dev :
154- name : Developer environment
155- runs-on : ubuntu-latest
156-
157- steps :
158- - name : Checkout repository
159- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
160-
161- - name : Set up Nix
162- uses : cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
163- with :
164- extra_nix_config : |
165- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
166-
167- - name : Check
168- run : nix flake check --impure
169-
170- - name : Dev shell
171- run : nix develop --impure
172-
173157 artifacts :
174158 name : Artifacts
175159 uses : ./.github/workflows/artifacts.yaml
@@ -207,14 +191,10 @@ jobs:
207191 - name : Checkout repository
208192 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
209193
210- - name : Set up Nix
211- uses : cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
194+ - name : Set up Go
195+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
212196 with :
213- extra_nix_config : |
214- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
215-
216- - name : Prepare Nix shell
217- run : nix develop --impure .#ci
197+ go-version-file : ' .go-version'
218198
219199 - name : Download docker image
220200 uses : actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
@@ -227,7 +207,7 @@ jobs:
227207 name : " [helm-chart] package"
228208
229209 - name : Test
230- run : nix develop --impure .#ci -c make test-e2e
210+ run : make test-e2e
231211 env :
232212 KIND_K8S_VERSION : ${{ matrix.k8s_version }}
233213 LOAD_IMAGE_ARCHIVE : ${{ github.workspace }}/docker.tar
0 commit comments