-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.01 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
name: Node.js CI
on:
push:
pull_request:
branches: [$default-branch]
jobs:
build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.47.2-jammy
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Cache dependencies
id: modules-cache
uses: actions/cache@v3
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- run: npm ci
if: steps.modules-cache.outputs.cache-hit != 'true'
- run: npm run build
- run: npm run coverage
env:
HOME: /root
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: "./coverage"