Skip to content

Bump github/codeql-action from 2 to 3 #235

Bump github/codeql-action from 2 to 3

Bump github/codeql-action from 2 to 3 #235

Workflow file for this run

# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Main Workflow
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
# Run code-style checks
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18'
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/
- uses: actions/cache@v3
id: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}
- name: Install packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Run Linters
run: npm run lint
# Run tests
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '18', '20']
name: Test Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/
- uses: actions/cache@v3
id: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('package-lock.json') }}
- name: Install packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Run Tests
run: npm test