-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (55 loc) · 1.44 KB
/
test.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
59
60
61
62
63
64
65
66
67
68
69
70
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Test
on:
push:
branches: ['**']
tags-ignore: ['*']
pull_request:
permissions: read-all
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
HUSKY: 0
jobs:
test:
name: Unit Test
strategy:
matrix:
node-version: ['18', '20']
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run actions/setup-sdk@local
uses: ./.github/setup-sdk
with:
nodeVersion: ${{ matrix.node-version }}
- if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}
name: Test and build
run: |
pnpm install
pnpm test
pnpm build
e2e-test:
name: E2E Test
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run actions/setup-sdk@local
uses: ./.github/setup-sdk
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30