fix(deps): update module github.com/cenkalti/backoff/v4 to v5 #542
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Workflow | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'pkg/**' | |
- 'e2e/**' | |
- 'cmd/**' | |
- 'Dockerfile*' | |
- 'go.mod' | |
- 'go.sum' | |
jobs: | |
init: | |
outputs: | |
tests: ${{ steps.e2es.outputs.result }} | |
runs-on: [ default ] | |
name: "Prepare E2E Scenarios" | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
# find all e2e scenarios in the e2e directory and generate an array of scenario names | |
- name: "E2E Detection" | |
id: e2es | |
run: | | |
scenarios=$(find ${GITHUB_WORKSPACE}/e2e -type f -name 'e2e_test.go' -exec dirname {} \; | xargs -n 1 basename | jq -R -s -c 'split("\n")[:-1]') | |
echo $scenarios | |
echo "result=$scenarios" >> $GITHUB_OUTPUT | |
e2e: | |
name: "Run ${{ matrix.e2es }}(${{ matrix.k8s-version}}) E2E" | |
if: needs.init.outputs.tests != '[]' | |
needs: [ init ] | |
runs-on: [ default ] | |
strategy: | |
fail-fast: false | |
matrix: | |
k8s-version: [ "v1.29.8", "v1.30.4", "v1.31.0" ] | |
e2es: ${{fromJson(needs.init.outputs.tests)}} | |
steps: | |
# run the e2e tests using composite common/workflows/e2e action | |
- name: "E2E" | |
id: e2e | |
uses: cloudoperators/common/workflows/e2e@main | |
with: | |
k8s-version: ${{ matrix.k8s-version }} | |
scenario: ${{ matrix.e2es }} | |
# v4 upload-artifact needs unique names for each artifact (see https://github.com/actions/upload-artifact/tree/main?tab=readme-ov-file#not-uploading-to-the-same-artifact) | |
- name: "Upload E2E Logs" | |
uses: actions/upload-artifact@v4 | |
if: ${{ steps.e2e.outputs.result != '' }} # skip if nothing needs to be uploaded | |
with: | |
name: e2e-logs-${{ matrix.e2es }}-${{ matrix.k8s-version }} | |
path: ${{steps.e2e.outputs.result}} | |
retention-days: 7 | |
if-no-files-found: ignore | |
artifacts: | |
name: "Merge Artifacts" | |
runs-on: [ default ] | |
needs: [ e2e ] | |
steps: | |
- name: "Merge Uploads" | |
continue-on-error: true # If there are no artifacts available, the merge step will fail so we need to continue on error | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: e2e-logs | |
pattern: e2e-logs-* | |
retention-days: 7 | |
delete-merged: true | |
# check if the e2e tests passed for all scenarios | |
checksOK: | |
name: "E2E Check" | |
needs: [ artifacts, e2e ] | |
runs-on: [ default ] | |
if: always() | |
steps: | |
- name: "Check if e2e passed" | |
run: | | |
if [ "${{ needs.e2e.result }}" == "success" ]; then | |
echo "✅ E2E passed 🎉" | |
else | |
echo "❌ E2E failed 😭" | |
exit 1 | |
fi |