Skip to content

chore(deps): update semver-compatible devdependencies #724

chore(deps): update semver-compatible devdependencies

chore(deps): update semver-compatible devdependencies #724

Workflow file for this run

name: Playwright
on:
push:
branches: ["main"]
pull_request:
branches:
- "**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # for actions/checkout
pull-requests: write # for find-comment and create-or-update-comment
jobs:
playwright:
name: Playwright
runs-on: ubuntu-latest
timeout-minutes: 5
container:
image: mcr.microsoft.com/playwright:v1.57.0-jammy@sha256:6aca677c27a967caf7673d108ac67ffaf8fed134f27e17b27a05464ca0ace831
outputs:
snapshotPatchArtifactUrl: ${{steps.upload-snapshot-patch-artifact.outputs.artifact-url}}
reportArtifactUrl: ${{steps.upload-report-artifact.outputs.artifact-url}}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version-file: ".nvmrc"
- run: corepack enable
- run: pnpm install
- name: Build all
run: pnpm run --recursive build
- name: Run Playwright tests
run: pnpm test:e2e
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
if: always()
id: upload-report-artifact
with:
name: playwright-report
path: "**/playwright-report/"
retention-days: 7
playwright-test-failure-comment:
name: Post Playwright test debugging instructions
# Do not leave a comment on forks, or for renovate branches
if: |
!cancelled() &&
needs.playwright.result == 'failure' &&
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == 'fpapado/svg-use' &&
github.actor != 'renovate[bot]'
runs-on: ubuntu-latest
needs:
- playwright
steps:
- name: Build help body
id: help-body
env:
REPOSITORY: "${{github.repository}}"
RUN_ID: "${{github.run_id}}"
REPORT_ARTIFACT_URL: "${{needs.playwright.outputs.snapshotPatchArtifactUrl}}"
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) # Security hardening: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
MESSAGE=$(cat <<HEREDOC
body<<$EOF
**Playwright failure test results**: <https://github.com/$REPOSITORY/actions/runs/$RUN_ID>
It looks like some of the Playwright tests failed.
Debugging:
- [Artifact with the Playwright report]($REPORT_ARTIFACT_URL). You can unzip it and inspect it with <https://trace.playwright.dev/>.
- If you made changes to the frontend UI without updating snapshots, this might be the cause.
You can update all snapshots locally by running pnpm test:e2e:update-snapshots. You will need Docker, in order to update the Linux-based snapshots.
$EOF
HEREDOC
)
echo "$MESSAGE" | tee "$GITHUB_OUTPUT"
- name: Find Comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "Playwright failure test results"
- name: Create or update comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
id: create-comment
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: ${{ steps.help-body.outputs.body }}
edit-mode: replace