woocommerce/plugins/woocommerce-blocks/.github/workflows/flaky-tests.yml

39 lines
1.3 KiB
YAML

name: Report Flaky Tests
on:
workflow_run:
workflows: ['E2E tests']
types:
- completed
jobs:
report-to-issues:
name: Report to GitHub issues
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `trunk` (e.g. in the case of a merge).
- uses: actions/checkout@v3
with:
repository: WordPress/gutenberg
ref: trunk
- name: Use desired version of NodeJS
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: Npm install and build
# TODO: We don't have to build the entire project, just the action itself.
run: |
npm ci
npm run build:packages
- name: Report flaky tests
uses: ./packages/report-flaky-tests
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: flaky test'
artifact-name-prefix: flaky-tests-report