-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (61 loc) · 1.91 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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
on:
push:
branches: [main, next]
pull_request:
branches: [main, next]
name: Tests
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
- uses: actions/[email protected]
with:
node-version: 20.x
cache: 'pnpm'
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm lint
test:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm test
- run: pnpm build
test-peer-deps:
name: ${{ matrix.package-version }}
runs-on: ubuntu-latest
strategy:
matrix:
package-version:
- jsdom@^20.0.0
- jsdom@^21.0.0
- jsdom@^22.0.0
- jsdom@^23.0.0
- jsdom@^24.0.0
- jsdom@^25.0.0
steps:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
- uses: actions/[email protected]
with:
node-version: 20.x
cache: 'pnpm'
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Install ${{ matrix.package-version }}
run: pnpm install --no-lockfile ${{ matrix.package-version }}
- run: pnpm test
- run: pnpm build