Skip to content

Improved gh actions

Improved gh actions #3

Workflow file for this run

# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Test Node.js app in CI
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x, 22.x ]
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Optional build step
run: npm run build --if-present
- name: Run tests
run: npm test