Skip to content

Commit a84f8ed

Browse files
author
ghosh-abhinaba
committed
updated tests.yml
1 parent 622f710 commit a84f8ed

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

.github/workflows/tests.yml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,47 @@ name: Test
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, develop]
66
pull_request:
7+
branches: [master]
78

89
jobs:
910
test:
1011
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [16, 18, 20]
15+
1116
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
1422
with:
15-
node-version: '16'
23+
node-version: ${{ matrix.node-version }}
1624
cache: 'npm'
17-
- run: npm install
18-
- run: npx playwright install --with-deps chromium
19-
- run: npm test
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Install Playwright
33+
run: npx playwright install --with-deps chromium
34+
35+
- name: Run tests (continue on failure)
36+
run: npm test
37+
continue-on-error: true
38+
39+
- name: Upload test results
40+
if: always()
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: test-results-node-${{ matrix.node-version }}
44+
path: |
45+
test-results/
46+
results/
47+
coverage/
48+
retention-days: 7

0 commit comments

Comments
 (0)