You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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: npm test
5
+
6
+
on:
7
+
workflow_dispatch:
8
+
push:
9
+
branches: [ "main" ]
10
+
pull_request:
11
+
branches: [ "main" ]
12
+
13
+
jobs:
14
+
build:
15
+
16
+
timeout-minutes: 5
17
+
18
+
strategy:
19
+
matrix:
20
+
os: [ubuntu-24.04]
21
+
node-version: [20.x, 22.x]
22
+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23
+
24
+
runs-on: ${{ matrix.os }}
25
+
26
+
steps:
27
+
- uses: actions/checkout@v3
28
+
- name: Use Node.js ${{ matrix.node-version }}
29
+
uses: actions/setup-node@v3
30
+
with:
31
+
node-version: ${{ matrix.node-version }}
32
+
cache: 'npm'
33
+
- name: Install dependencies
34
+
run: npm ci
35
+
- run: npm run build --if-present
36
+
- name: Run tests on ${{ matrix.os }} node ${{ matrix.node-version }}
0 commit comments