2024-01-30 22:21:52 +00:00
|
|
|
name: 'pr:e2e:flakefinder'
|
|
|
|
|
|
|
|
on:
|
2024-03-05 02:32:12 +00:00
|
|
|
# push:
|
|
|
|
# branches: master
|
2024-01-30 22:21:52 +00:00
|
|
|
workflow_dispatch:
|
2024-03-05 02:32:12 +00:00
|
|
|
# pull_request:
|
|
|
|
# types:
|
|
|
|
# - labeled
|
|
|
|
# - opened
|
|
|
|
# schedule:
|
|
|
|
# - cron: '0 0 * * *'
|
2024-01-30 22:21:52 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
e2e-flakefinder:
|
|
|
|
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:flakefinder') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.action == 'opened'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 120
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: 'lts/hydrogen'
|
|
|
|
|
|
|
|
- name: Cache NPM dependencies
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-node-
|
|
|
|
|
2024-10-22 00:03:54 +00:00
|
|
|
- run: npx playwright@1.48.1 install
|
2024-03-14 16:27:31 +00:00
|
|
|
- run: npm ci --no-audit --progress=false
|
2024-01-30 22:21:52 +00:00
|
|
|
|
|
|
|
- name: Run E2E Tests (Repeated 10 Times)
|
2024-08-07 21:36:14 +00:00
|
|
|
run: npm run test:e2e:ci -- --retries=0 --repeat-each=10 --max-failures=50
|
2024-01-30 22:21:52 +00:00
|
|
|
|
|
|
|
- name: Archive test results
|
|
|
|
if: success() || failure()
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
path: test-results
|
|
|
|
|
|
|
|
- name: Remove pr:e2e:flakefinder label (if present)
|
|
|
|
if: always()
|
|
|
|
uses: actions/github-script@v6
|
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
const { owner, repo, number } = context.issue;
|
|
|
|
const labelToRemove = 'pr:e2e:flakefinder';
|
|
|
|
try {
|
|
|
|
await github.rest.issues.removeLabel({
|
|
|
|
owner,
|
|
|
|
repo,
|
|
|
|
issue_number: number,
|
|
|
|
name: labelToRemove
|
|
|
|
});
|
|
|
|
} catch (error) {
|
|
|
|
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
|
|
|
|
}
|