Update more deps #245
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v4 | |
with: | |
node-version: '20' | |
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/ | |
- uses: actions/cache@v4 | |
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: ['18', '20', '22'] | |
name: Test Node ${{ matrix.node }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/ | |
- uses: actions/cache@v4 | |
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 |