46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Check
|
|
|
|
on:
|
|
push:
|
|
branches: ['main']
|
|
pull_request:
|
|
branches: ['main']
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: docker
|
|
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
|
|
- name: Setup Node
|
|
uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
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: https://github.com/actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
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
|
|
if: ${{ github.actor != 'renovate-bot' && !startsWith(github.ref, 'refs/heads/renovate/') && !startsWith(github.head_ref, 'renovate/') }}
|