This commit is contained in:
Andras Schmelczer 2026-06-06 15:42:40 +01:00
parent c6438a9e21
commit 974a97c134
3 changed files with 139 additions and 1 deletions

View file

@ -0,0 +1,45 @@
name: Check
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
check:
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
check-latest: true
# package-lock.json is gitignored, so cache the global npm download cache
# keyed on package.json rather than relying on `npm ci` + a lockfile.
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm install
- name: Check formatting
run: npm run format
- name: Lint
run: npm run lint
- name: Type-check
run: npm test
- name: Build
run: npm run build