-
Notifications
You must be signed in to change notification settings - Fork 99
42 lines (41 loc) · 1.1 KB
/
nodejs.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
name: Node CI
on: [push]
env:
FORCE_COLOR: 2
jobs:
test:
name: v${{ matrix.node }} @ ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node:
- 16.0.0
- 16
- 18.0.0
- 18
- 20
# TODO: Unpin to `22` once parcel incomaptibility with 22.7+ is resolved
# - https://github.com/nodejs/node/issues/54573
# - https://github.com/parcel-bundler/parcel/issues/9926
- 22.6
os:
- ubuntu-latest
- macOS-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- name: Build and run tests
run: |
npm run build --if-present
npm test
- name: Run browser tests and lint
run: |
npm run browser-tests
npm run lint