Skip to content

chore: formats code with prettier #32

chore: formats code with prettier

chore: formats code with prettier #32

Workflow file for this run

name: linting & test coverage - linux
on:
push:
branches:
- master
pull_request:
env:
CI: true
defaults:
run:
shell: bash
jobs:
check:
strategy:
fail-fast: false
matrix:
node-version:
- 18.x
- 22.x
platform:
- ubuntu-latest
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v4
- name: cache node modules for ${{matrix.node-version}}@${{matrix.platform}}
uses: actions/cache@v4
with:
path: node_modules
key: ${{matrix.node-version}}@${{matrix.platform}}-build-${{hashFiles('package.json')}}
restore-keys: |
${{matrix.node-version}}@${{matrix.platform}}-build-
- name: set up node ${{matrix.node-version}}@${{matrix.platform}}
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-version}}
- name: install & build
run: |
node --version
npm install
npm run build
- name: lint & forbidden dependency check (runs on one platform only)
run: |
node --version
npm run lint
npm run depcruise
if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '22.x'
- name: test
if: matrix.node-version == '22.x'
run: |
node --version
npm run test:cover
- name: test
# node 18 doesn't throw a warning when using the native 'punycode' module
# it _does_ throw an error when you want to ignore that warning, though.
# punycode is b.t.w. pulled in transitively by jsdom
if: matrix.node-version == '18.x'
run: |
node --version
npm run test:node18