Merge pull request #306 from Bootstrap-Academy/renovate/clap-4.x #1028
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check | |
on: | |
push: | |
branches: [develop] | |
pull_request: | |
merge_group: | |
permissions: | |
contents: read | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
if: ${{ !(github.event_name == 'push' && github.actor == 'github-merge-queue[bot]') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
- run: nix fmt -- --ci | |
clippy: | |
runs-on: ubuntu-latest | |
if: ${{ !(github.event_name == 'push' && github.actor == 'github-merge-queue[bot]') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- run: cargo clippy --all-targets -- -D warnings | |
cargo-nix: | |
name: cargo-nix | |
runs-on: ubuntu-latest | |
if: ${{ !(github.event_name == 'push' && github.actor == 'github-merge-queue[bot]') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- run: nix run --accept-flake-config .#scripts.generate | |
- run: git diff --exit-code | |
clorinde: | |
runs-on: ubuntu-latest | |
if: ${{ !(github.event_name == 'push' && github.actor == 'github-merge-queue[bot]') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- run: | | |
for m in academy_persistence/postgres/migrations/*/up.sql; do | |
psql -h 127.0.0.1 academy academy < "$m" | |
done | |
- run: nix run --accept-flake-config .#scripts.generate-clorinde | |
- run: git diff --exit-code | |
services: | |
postgres: | |
image: postgres:17-alpine | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_USER: academy | |
POSTGRES_DB: academy | |
POSTGRES_HOST_AUTH_METHOD: trust |