-
-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (71 loc) · 1.88 KB
/
test.yml
File metadata and controls
73 lines (71 loc) · 1.88 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Test
on:
pull_request:
types: [ready_for_review, opened, synchronize, reopened]
paths:
- '**/tsconfig.json'
- 'tests/**/*.ts'
- 'src/**/*.ts'
- 'package-lock.json'
branches:
- main
- 'release/*'
jobs:
setup-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v5
test-browser:
needs: setup-test
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests on jsdom
run: npm run test -- --environment=jsdom
test-node:
needs: setup-test
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node: ['lts/*', 'current']
fail-fast: false
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests on node ${{ matrix.node }}
run: npm run test
test-edge:
needs: setup-test
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node: ['lts/*', 'current']
fail-fast: false
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests on node ${{ matrix.node }}
run: npm run test -- --environment edge-runtime