Skip to content

Commit

Permalink
test: make puppeteer tests required on releases (#2892)
Browse files Browse the repository at this point in the history
This PR adds an automation label `puppeteer-required` that would make
Puppeteer test failures to block the release PRs requiring suppressing
the test failure in Puppeteer's main branch if a change with regressions
needs to be released.
  • Loading branch information
OrKoN authored Dec 13, 2024
1 parent 9308266 commit 003dca4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
permissions:
pull-requests: write
steps:
- run: gh pr edit "$NUMBER" --add-label "puppeteer"
- run: gh pr edit "$NUMBER" --add-label "puppeteer" --add-label "puppeteer-required"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/puppeteer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,13 @@ jobs:
env:
PUPPETEER_EXECUTABLE_PATH: ${{ steps.browser.outputs.executablePath }}
run: xvfb-run --auto-servernum npm run test:chrome:bidi -- --shard '${{ matrix.shard }}'

puppeteer-test-required:
name: '[Required] Puppeteer tests'
needs: [puppeteer-test]
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- if: ${{ needs.puppeteer-test.result != 'success' && contains(github.event.pull_request.labels.*.name, 'puppeteer-required') }}
run: 'exit 1'
- run: 'exit 0'

0 comments on commit 003dca4

Please sign in to comment.