mirror of
https://github.com/nasa/openmct.git
synced 2024-12-27 16:38:51 +00:00
762762945d
* chore: bump playwright to `1.45.2` * chore: update package-lock
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: 'e2e-perf'
|
|
on:
|
|
push:
|
|
branches: master
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
- opened
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
jobs:
|
|
e2e-full:
|
|
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:perf') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
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-
|
|
|
|
- run: npx playwright@1.45.2 install
|
|
- run: npm ci --no-audit --progress=false
|
|
- run: npm run test:perf:localhost
|
|
- run: npm run test:perf:contract
|
|
- run: npm run test:perf:memory
|
|
- name: Archive test results
|
|
if: success() || failure()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: test-results
|
|
|
|
- name: Remove pr:e2e:perf label (if present)
|
|
if: always()
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
const { owner, repo, number } = context.issue;
|
|
const labelToRemove = 'pr:e2e:perf';
|
|
try {
|
|
await github.rest.issues.removeLabel({
|
|
owner,
|
|
repo,
|
|
issue_number: number,
|
|
name: labelToRemove
|
|
});
|
|
} catch (error) {
|
|
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
|
|
}
|