2026-02-12 15:44:09 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
pull_request:
|
|
|
|
|
branches: [main]
|
|
|
|
|
push:
|
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
lint-commits:
|
|
|
|
|
name: Lint commits
|
2026-05-27 15:45:38 +02:00
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
|
|
|
|
image: docker.io/library/node:22
|
2026-02-12 15:44:09 +01:00
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
with:
|
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
2026-02-12 17:53:24 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
|
run: npm ci
|
2026-02-12 15:44:09 +01:00
|
|
|
|
2026-02-12 17:53:24 +01:00
|
|
|
- name: Validate conventional commits
|
2026-05-27 15:45:38 +02:00
|
|
|
run: |
|
|
|
|
|
npx commitlint \
|
|
|
|
|
--from ${{ github.event.pull_request.base.sha }} \
|
|
|
|
|
--to ${{ github.event.pull_request.head.sha }} \
|
|
|
|
|
--verbose
|
2026-02-12 15:44:09 +01:00
|
|
|
|
|
|
|
|
build-and-test:
|
|
|
|
|
name: Build & test
|
2026-05-27 15:45:38 +02:00
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
|
|
|
|
image: docker.io/library/node:22
|
2026-02-12 15:44:09 +01:00
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
|
|
- name: Check formatting
|
|
|
|
|
run: npx prettier --check .
|
|
|
|
|
|
|
|
|
|
- name: Typecheck
|
|
|
|
|
run: npx tsc --noEmit
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
|
run: npm test
|