Skip to content

CI

CI #212

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
merge_group:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # checkout
env:
CARGO_TERM_COLOR: always
DATABASE_URL: postgres://postgres:postgres@localhost:5436/test
jobs:
ci:
name: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Start Postgres
run: docker compose up -d --wait
- name: Install uv
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
- name: Validate schema matches migrations
run: ./scripts/validate-schema
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master
with:
toolchain: stable
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Install nextest
uses: taiki-e/install-action@1329c298aa20c3257846c9b2e0e55967df3e3c37 # v2.75.25
with:
tool: cargo-nextest
- name: Run tests
run: cargo test-all