Skip to content

ci: Add NPM CI workflow for testing and building #1

ci: Add NPM CI workflow for testing and building

ci: Add NPM CI workflow for testing and building #1

Workflow file for this run

name: Code quality
on:
push:
pull_request:
branches: ["main"]
jobs:
quality:
name: Lint, Format & Audit
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Format code
run: npm run prettier
- name: Run npm audit
run: npm audit --audit-level=high
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .