Skip to content

deps(gha)(deps): bump docker/setup-buildx-action from 4.0.0 to 4.1.0 in /.github/workflows #2465

deps(gha)(deps): bump docker/setup-buildx-action from 4.0.0 to 4.1.0 in /.github/workflows

deps(gha)(deps): bump docker/setup-buildx-action from 4.0.0 to 4.1.0 in /.github/workflows #2465

Workflow file for this run

name: End-to-end testing
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
docker_e2e:
permissions:
contents: read
pull-requests: write
# If the workflow was triggered by anything other than a pull_request event
# (e.g., push, workflow_dispatch, schedule, pull_request_target),
# github.event_name != 'pull_request' is true.
# github.event.pull_request is only populated on pull_request events.
# It is true when the PR is not a draft (i.e., “Ready for review”).
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
REPORT_LOCAL_DIR: test-reports
REPORT_LOCAL_FILE: wasm-e2e-report.html
WASM_REPORT_JSON_FILE: wasm.json
GRATE_REPORT_JSON_FILE: grates.json
REPORT_HTML_IN_REPORTS: report.html
COMMENT_LOCAL_FILE: e2e_comment.md
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Build e2e (attempt 1)
id: build_e2e_try1
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Docker/Dockerfile.e2e
target: artifacts
tags: e2e:latest
outputs: type=local,dest=${{ env.REPORT_LOCAL_DIR }}
- name: Backoff (after try 1)
if: ${{ always() && steps.build_e2e_try1.outcome == 'failure' }}
run: sleep 15
- name: Build e2e (attempt 2)
id: build_e2e_try2
if: steps.build_e2e_try1.outcome == 'failure'
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Docker/Dockerfile.e2e
target: artifacts
tags: e2e:latest
outputs: type=local,dest=${{ env.REPORT_LOCAL_DIR }}
- name: Backoff (after try 2)
if: ${{ always() && steps.build_e2e_try2.outcome == 'failure' }}
run: sleep 30
- name: Build e2e (attempt 3)
id: build_e2e_try3
if: steps.build_e2e_try2.outcome == 'failure'
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Docker/Dockerfile.e2e
target: artifacts
tags: e2e:latest
outputs: type=local,dest=${{ env.REPORT_LOCAL_DIR }}
- name: Fail if all e2e build attempts failed
if: ${{ always() && steps.build_e2e_try1.outcome == 'failure' && steps.build_e2e_try2.outcome == 'failure' && steps.build_e2e_try3.outcome == 'failure' }}
run: |
echo "All e2e build attempts failed"
exit 1
- name: Read test status
id: e2e
if: ${{ always() }}
run: |
STATUS_FILE="${{ env.REPORT_LOCAL_DIR }}/e2e_status"
echo "Checking status file at: $STATUS_FILE"
echo "----- File contents (if any) -----"
if [[ -f "$STATUS_FILE" ]]; then
cat "$STATUS_FILE"
cat "$STATUS_FILE" >> "$GITHUB_OUTPUT"
cat "$STATUS_FILE" >> "$GITHUB_ENV"
else
echo "(none)"
echo "E2E_STATUS=fail" >> "$GITHUB_OUTPUT"
echo "E2E_STATUS=fail" >> "$GITHUB_ENV"
echo "::warning file=$STATUS_FILE::Status file missing, defaulting to fail"
fi
echo "----------------------------------"
- name: Upload HTML report artifact to report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: wasm-e2e-report
path: |
${{ env.REPORT_LOCAL_DIR }}/reports/${{ env.REPORT_HTML_IN_REPORTS }}
${{ env.REPORT_LOCAL_DIR }}/${{ env.REPORT_LOCAL_FILE }}
if-no-files-found: error
retention-days: 7
- name: Upload wasm JSON report artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: wasm-e2e-json
path: ${{ env.REPORT_LOCAL_DIR }}/reports/${{ env.WASM_REPORT_JSON_FILE }}
if-no-files-found: error
retention-days: 7
- name: Upload grate JSON report artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: grate-e2e-json
path: ${{ env.REPORT_LOCAL_DIR }}/reports/${{ env.GRATE_REPORT_JSON_FILE }}
if-no-files-found: error
retention-days: 7
- name: Upload unified runner HTML report artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: wasm-e2e-unified-html
path: |
${{ env.REPORT_LOCAL_DIR }}/reports/${{ env.REPORT_HTML_IN_REPORTS }}
${{ env.REPORT_LOCAL_DIR }}/${{ env.REPORT_LOCAL_FILE }}
if-no-files-found: error
retention-days: 7
- name: Post PR comment
# Run only on branch PRs, not on fork PRs
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
with:
script: |
const fs = require('fs');
const path = `${process.env.REPORT_LOCAL_DIR}/${process.env.COMMENT_LOCAL_FILE}`;
const body = fs.readFileSync(path, 'utf8');
const { owner, repo } = context.repo;
const issue_number = context.issue.number;
await github.rest.issues.createComment({ owner, repo, issue_number, body });
- name: Fail if tests failed
if: ${{ always() && steps.e2e.outputs.E2E_STATUS == 'fail' }}
run: |
echo "Tests failed; failing job after posting the report/comment."
exit 1