-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (33 loc) · 1.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
checks:
name: Run all checks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Install pnpm dependencies
run: nix develop --command pnpm install
- name: Check formatting
run: nix develop --command pnpm run check-fmt
- name: Run pre-build
run: nix develop --command pnpm run prebuild
- name: Lint
run: nix develop --command pnpm run lint
- name: Build
run: nix develop --command pnpm run build
- name: Check git status
run: git status --porcelain=v1
- name: Ensure no staged changes
run: test $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0
# Docs are hosted on Netlify but we should get feedback on that here in Actions as well
- name: Build docs
run: |
rm -rf dist
nix develop --command pnpm run docs