-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.17 KB
/
test.yaml
File metadata and controls
47 lines (44 loc) · 1.17 KB
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
name: "Test"
on:
pull_request:
jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
node-version:
- 22.x
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Use pnpm@9
uses: pnpm/action-setup@v2
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install
run: |
pnpm install --frozen-lockfile
- name: Check pnpm-lock.yaml
run: git diff --exit-code pnpm-lock.yaml
- name: "Test"
run: pnpx vitest --coverage.enabled true
- name: "Report coverage"
if: always()
uses: davelosert/vitest-coverage-report-action@v2
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30