Skip to content

Commit cbbb279

Browse files
authored
Create node.js.yml
1 parent f5917bf commit cbbb279

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
- "master"
10+
- "try_github_actions"
11+
pull_request:
12+
branches:
13+
- "master"
14+
- "try_github_actions"
15+
16+
jobs:
17+
build:
18+
19+
runs-on: ubuntu-latest
20+
21+
strategy:
22+
matrix:
23+
node-version: [18.x, 20.x, 22.x]
24+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: 'npm'
33+
- run: npm ci
34+
- run: npm run build --if-present
35+
- run: npm test

0 commit comments

Comments
 (0)