node 26.13.0, pnpm 12.16.1, corepack and python3+pipx are baked into git.fristy.net/actions/runner-images, so setup-node, pnpm/action-setup and setup-python only re-downloaded them (and burned the shared GitHub API quota). setup-python also asked for 3.15, which has no build for the Ubuntu 26.10 runner image, breaking the Code Health job.
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
check:
|
|
name: Lint, Test & Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# node, pnpm and python are baked into git.fristy.net/actions/runner-images,
|
|
# so no setup-* action (and no GitHub API call) is needed here.
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Get pnpm store path
|
|
id: pnpm-store
|
|
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
- name: Cache pnpm store
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ${{ steps.pnpm-store.outputs.path }}
|
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Check formatting
|
|
run: pnpm format:check
|
|
- name: Lint
|
|
run: pnpm lint
|
|
- name: Test
|
|
run: pnpm test
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
health:
|
|
name: Code Health
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Scan with desloppify (CI profile, objective only)
|
|
continue-on-error: true
|
|
run: |
|
|
pipx run --spec desloppify desloppify scan --profile ci --path . --no-badge
|
|
- name: Upload scorecard
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: desloppify-scorecard
|
|
path: scorecard.png
|
|
if-no-files-found: ignore
|