Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
typescript:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_USER: photoreport
|
|
POSTGRES_PASSWORD: photoreport
|
|
POSTGRES_DB: photoreport_test
|
|
options: >-
|
|
--health-cmd "pg_isready -U photoreport"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
env:
|
|
DATABASE_URL_TEST: postgresql://photoreport:photoreport@postgres:5432/photoreport_test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
# TODO: commit pnpm-lock.yaml, then restore `cache: pnpm` above and `--frozen-lockfile` here.
|
|
- run: pnpm install
|
|
- run: pnpm -r build
|
|
- run: pnpm -r typecheck
|
|
- run: pnpm -r test
|
|
- name: Deploy scripts parse
|
|
run: bash -n infra/deploy/deploy.sh
|
|
|
|
rust:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- run: cargo fmt --all --check
|
|
- run: cargo clippy --workspace --all-targets -- -D warnings
|
|
- run: cargo test --workspace
|
|
- name: Generated controls are up to date
|
|
run: |
|
|
cargo run -q -p photoreport-engine --example export_controls > packages/contracts/src/controls.generated.json
|
|
git diff --exit-code packages/contracts/src/controls.generated.json
|