Skip to content

Commit 5a04f76

Browse files
Create node.js.yml
1 parent 3036919 commit 5a04f76

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/node.js.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches:
9+
- "main"
10+
# 4.1 included temporarily to test out github workflow
11+
- "4.1"
12+
pull_request:
13+
branches: [ "main" ]
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
node-version: [14.x, 16.x, 18.x]
23+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
- run: npm ci
33+
- run: npm run build --if-present
34+
- run: npm test

0 commit comments

Comments
 (0)