forked from jmandel/fhir-js-client
-
Notifications
You must be signed in to change notification settings - Fork 211
45 lines (36 loc) · 1.01 KB
/
node.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
name: NodeJS Tests
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x, 20.x ]
steps:
# Checkout the repository
- uses: actions/checkout@v3
# Setup Node.js environment (use matrix for different versions)
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# Install dependencies
- name: Install dependencies
run: npm ci --legacy-peer-deps
# Build the project (if a build script exists)
- name: Build the project
run: npm run build --if-present
# Run tests
- name: Run tests
run: npm run cover:unit
# Upload coverage to Coveralls
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}