Skip to content

Commit ed4a07f

Browse files
author
DavertMik
committed
improved unit tests setup
1 parent 9598783 commit ed4a07f

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,42 @@ on:
99
- '**'
1010

1111
jobs:
12-
build:
12+
unit-tests:
13+
name: Unit tests
14+
runs-on: ubuntu-22.04
15+
16+
strategy:
17+
matrix:
18+
node-version: [20.x, 22.x]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm i
27+
env:
28+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
29+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
30+
- run: npm run test:unit
1331

32+
runner-tests:
33+
name: Runner tests
1434
runs-on: ubuntu-22.04
1535

1636
strategy:
1737
matrix:
18-
node-version: [20.x]
38+
node-version: [20.x, 22.x]
1939

2040
steps:
21-
- uses: actions/checkout@v4
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: ${{ matrix.node-version }}
26-
- run: npm i --force
27-
env:
28-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
29-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
30-
- uses: nick-fields/retry@v3
31-
with:
32-
timeout_minutes: 6
33-
max_attempts: 3
34-
retry_on: error
35-
command: npm test
41+
- uses: actions/checkout@v4
42+
- name: Use Node.js ${{ matrix.node-version }}
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
- run: npm i
47+
env:
48+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
49+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
50+
- run: npm run test:runner

0 commit comments

Comments
 (0)