11name : Integration tests
2+
23on :
34 push :
45 branches :
5- - ' master'
6- - ' release-*'
7- - ' !release-1.4'
8- - ' !release-1.5'
6+ # We use skyscanner-internal/master as the base branch for integration
7+ # This branch contains our CI changes and is not meant for direct contributions.
8+ # Our internal development is to be merged into here.
9+ # The changes that are ready for contribution should be cherry-picked to skyscanner-contrib/master.
10+ - skyscanner-internal/master
11+ # Branches to be used for development and testing. They should be based on skyscanner-internal/master.
12+ - skyscanner-internal/develop/**
913 pull_request :
1014 branches :
11- - ' master'
12- - ' release-*'
15+ - skyscanner-internal/master
16+ # Cleaned up, ready for contribution PRs are to be cherry-picked here
17+ - skyscanner-contrib/master
18+
19+ # on:
20+ # push:
21+ # branches:
22+ # - 'master'
23+ # - 'release-*'
24+ # - '!release-1.4'
25+ # - '!release-1.5'
26+ # pull_request:
27+ # branches:
28+ # - 'master'
29+ # - 'release-*'
1330
1431env :
1532 # Golang version to use across CI steps
1835
1936concurrency :
2037 group : ${{ github.workflow }}-${{ github.ref }}
21- cancel-in-progress : true
38+ cancel-in-progress : ${{ github.ref != 'refs/heads/master' }}
2239
2340permissions :
2441 contents : read
3249 docs : ${{ steps.filter.outputs.docs_any_changed }}
3350 steps :
3451 - uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
35- - uses : tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45 .0.5
52+ - uses : tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46 .0.5
3653 id : filter
3754 with :
3855 # Any file which is not under docs/, ui/ or is not a markdown file is counted as a backend file
5774 - name : Checkout code
5875 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
5976 - name : Setup Golang
60- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
77+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
6178 with :
6279 go-version : ${{ env.GOLANG_VERSION }}
6380 - name : Download all Go modules
@@ -78,11 +95,11 @@ jobs:
7895 - name : Checkout code
7996 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
8097 - name : Setup Golang
81- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
98+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
8299 with :
83100 go-version : ${{ env.GOLANG_VERSION }}
84101 - name : Restore go build cache
85- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
102+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
86103 with :
87104 path : ~/.cache/go-build
88105 key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -105,14 +122,14 @@ jobs:
105122 - name : Checkout code
106123 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
107124 - name : Setup Golang
108- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
125+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
109126 with :
110127 go-version : ${{ env.GOLANG_VERSION }}
111128 - name : Run golangci-lint
112- uses : golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
129+ uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
113130 with :
114131 # renovate: datasource=go packageName=github.com/golangci/golangci-lint versioning=regex:^v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)?$
115- version : v1.64.7
132+ version : v2.2.1
116133 args : --verbose
117134
118135 test-go :
@@ -133,7 +150,7 @@ jobs:
133150 - name : Create symlink in GOPATH
134151 run : ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
135152 - name : Setup Golang
136- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
153+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
137154 with :
138155 go-version : ${{ env.GOLANG_VERSION }}
139156 - name : Install required packages
@@ -153,7 +170,7 @@ jobs:
153170 run : |
154171 echo "/usr/local/bin" >> $GITHUB_PATH
155172 - name : Restore go build cache
156- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
173+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
157174 with :
158175 path : ~/.cache/go-build
159176 key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -174,7 +191,7 @@ jobs:
174191 - name : Run all unit tests
175192 run : make test-local
176193 - name : Generate test results artifacts
177- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
194+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
178195 with :
179196 name : test-results
180197 path : test-results
@@ -197,7 +214,7 @@ jobs:
197214 - name : Create symlink in GOPATH
198215 run : ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
199216 - name : Setup Golang
200- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
217+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
201218 with :
202219 go-version : ${{ env.GOLANG_VERSION }}
203220 - name : Install required packages
@@ -217,7 +234,7 @@ jobs:
217234 run : |
218235 echo "/usr/local/bin" >> $GITHUB_PATH
219236 - name : Restore go build cache
220- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
237+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
221238 with :
222239 path : ~/.cache/go-build
223240 key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -238,7 +255,7 @@ jobs:
238255 - name : Run all unit tests
239256 run : make test-race-local
240257 - name : Generate test results artifacts
241- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
258+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
242259 with :
243260 name : race-results
244261 path : test-results/
@@ -253,7 +270,7 @@ jobs:
253270 - name : Checkout code
254271 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
255272 - name : Setup Golang
256- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
273+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
257274 with :
258275 go-version : ${{ env.GOLANG_VERSION }}
259276 - name : Create symlink in GOPATH
@@ -305,13 +322,13 @@ jobs:
305322 - name : Checkout code
306323 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
307324 - name : Setup NodeJS
308- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1 .0
325+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
309326 with :
310327 # renovate: datasource=node-version packageName=node versioning=node
311328 node-version : ' 22.9.0'
312329 - name : Restore node dependency cache
313330 id : cache-dependencies
314- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
331+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
315332 with :
316333 path : ui/node_modules
317334 key : ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -327,12 +344,22 @@ jobs:
327344 NODE_ONLINE_ENV : online
328345 HOST_ARCH : amd64
329346 # If we're on the master branch, set the codecov token so that we upload bundle analysis
330- CODECOV_TOKEN : ${{ github.ref == 'refs/heads/master' && secrets.CODECOV_TOKEN || '' }}
347+ # TODO: Needs codecov, which we do not support yet
348+ # CODECOV_TOKEN: ${{ github.ref == 'refs/heads/master' && secrets.CODECOV_TOKEN || '' }}
331349 working-directory : ui/
332350 - name : Run ESLint
333351 run : yarn lint
334352 working-directory : ui/
335353
354+ shellcheck :
355+ runs-on : ubuntu-latest
356+ steps :
357+ - uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
358+ - run : |
359+ sudo apt-get install shellcheck
360+ shellcheck -e SC2086 -e SC2046 -e SC2068 -e SC2206 -e SC2048 -e SC2059 -e SC2154 -e SC2034 -e SC2016 -e SC2128 -e SC1091 -e SC2207 $(find . -type f -name '*.sh') | tee sc.log
361+ test ! -s sc.log
362+
336363 analyze :
337364 name : Process & analyze test artifacts
338365 if : ${{ needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true' }}
@@ -351,20 +378,20 @@ jobs:
351378 fetch-depth : 0
352379 - name : Restore node dependency cache
353380 id : cache-dependencies
354- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
381+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
355382 with :
356383 path : ui/node_modules
357384 key : ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
358385 - name : Remove other node_modules directory
359386 run : |
360387 rm -rf ui/node_modules/argo-ui/node_modules
361388 - name : Get e2e code coverage
362- uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
389+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
363390 with :
364391 name : e2e-code-coverage
365392 path : e2e-code-coverage
366393 - name : Get unit test code coverage
367- uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
394+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
368395 with :
369396 name : test-results
370397 path : test-results
@@ -375,26 +402,27 @@ jobs:
375402 # references to their coverage output directories.
376403 run : |
377404 go tool covdata percent -i=test-results,e2e-code-coverage/applicationset-controller,e2e-code-coverage/repo-server,e2e-code-coverage/app-controller,e2e-code-coverage/commit-server -o test-results/full-coverage.out
378- - name : Upload code coverage information to codecov.io
379- uses : codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
380- with :
381- file : test-results/full-coverage.out
382- fail_ci_if_error : true
383- env :
384- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
385- - name : Upload test results to Codecov
386- if : github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'argoproj/argo-cd'
387- uses : codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 # v1.0.1
388- with :
389- file : test-results/junit.xml
390- fail_ci_if_error : true
391- token : ${{ secrets.CODECOV_TOKEN }}
392- - name : Perform static code analysis using SonarCloud
393- env :
394- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
395- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
396- uses : SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
397- if : env.sonar_secret != ''
405+ # TODO: Needs allowlisting
406+ # - name: Upload code coverage information to codecov.io
407+ # uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
408+ # with:
409+ # files: test-results/full-coverage.out
410+ # fail_ci_if_error: true
411+ # env:
412+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
413+ # - name: Upload test results to Codecov
414+ # if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'Skyscanner/argo-cd'
415+ # uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
416+ # with:
417+ # file: test-results/junit.xml
418+ # fail_ci_if_error: true
419+ # token: ${{ secrets.CODECOV_TOKEN }}
420+ # - name: Perform static code analysis using SonarCloud
421+ # env:
422+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
423+ # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
424+ # uses: SonarSource/sonarqube-scan-action@2500896589ef8f7247069a56136f8dc177c27ccf # v5.2.0
425+ # if: env.sonar_secret != ''
398426 test-e2e :
399427 name : Run end-to-end tests
400428 if : ${{ needs.changes.outputs.backend == 'true' }}
@@ -405,14 +433,14 @@ jobs:
405433 # latest: true means that this version mush upload the coverage report to codecov.io
406434 # We designate the latest version because we only collect code coverage for that version.
407435 k3s :
408- - version : v1.32 .1
436+ - version : v1.33 .1
409437 latest : true
438+ - version : v1.32.1
439+ latest : false
410440 - version : v1.31.0
411441 latest : false
412442 - version : v1.30.4
413443 latest : false
414- - version : v1.29.8
415- latest : false
416444 needs :
417445 - build-go
418446 - changes
@@ -440,7 +468,7 @@ jobs:
440468 - name : Checkout code
441469 uses : actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
442470 - name : Setup Golang
443- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2 .0
471+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
444472 with :
445473 go-version : ${{ env.GOLANG_VERSION }}
446474 - name : GH actions workaround - Kill XSP4 process
@@ -459,7 +487,7 @@ jobs:
459487 sudo chmod go-r $HOME/.kube/config
460488 kubectl version
461489 - name : Restore go build cache
462- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
490+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
463491 with :
464492 path : ~/.cache/go-build
465493 key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -485,7 +513,7 @@ jobs:
485513 git config --global user.email "john.doe@example.com"
486514 - name : Pull Docker image required for tests
487515 run : |
488- docker pull ghcr.io/dexidp/dex:v2.41.1
516+ docker pull ghcr.io/dexidp/dex:v2.43.0
489517 docker pull argoproj/argo-cd-ci-builder:v1.0.0
490518 docker pull redis:7.2.7-alpine
491519 - name : Create target directory for binaries in the build-process
@@ -517,13 +545,13 @@ jobs:
517545 goreman run stop-all || echo "goreman trouble"
518546 sleep 30
519547 - name : Upload e2e coverage report
520- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
548+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
521549 with :
522550 name : e2e-code-coverage
523551 path : /tmp/coverage
524552 if : ${{ matrix.k3s.latest }}
525553 - name : Upload e2e-server logs
526- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
554+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
527555 with :
528556 name : e2e-server-k8s${{ matrix.k3s.version }}.log
529557 path : /tmp/e2e-server.log
0 commit comments