-
Notifications
You must be signed in to change notification settings - Fork 223
58 lines (56 loc) · 1.69 KB
/
performance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Performance Testing
on:
push:
branches: [main]
pull_request: {}
jobs:
playwright:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['lts/hydrogen']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
# not caching node_modules because `npm ci` removes it
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Copy secrets example file
run: npm run copy-secrets
- name: Prepare for Playwright tests
run: npm run playwright:prepare-ci
- name: Run Playwright tests
run: npm run playwright:ci:performance
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: 'playwright-coverage'
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ strategy.job-index }}
path: |
playwright-report/
test-results/
retention-days: 30