* build(deps): bump actions/cache from 4 to 5 Bump the actions-deps group. * build(deps): bump cargo-deps group (anyhow, chrono, clap, uuid, tempfile) - anyhow 1.0.101 → 1.0.102 - chrono 0.4.43 → 0.4.44 - clap 4.5.57 → 4.5.60 - uuid 1.20.0 → 1.21.0 - tempfile 3.24.0 → 3.25.0 * build(deps): bump sqlx from 0.7.4 to 0.8.6 * build(deps): bump rand from 0.8.5 to 0.9.2 Migrate API changes: - Replace OsRng.fill_bytes() with rand::rng().fill_bytes() - Replace rand::thread_rng() with rand::rng() * build(deps): bump thiserror from 1.0.69 to 2.0.18
79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install nix
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- name: Setup Nix cache
|
|
uses: nix-community/cache-nix-action@main
|
|
with:
|
|
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
|
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
|
|
- name: Cache Cargo artifacts
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-check
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Check formatting
|
|
run: nix develop -c cargo fmt --check
|
|
|
|
- name: Clippy
|
|
run: nix develop -c cargo clippy
|
|
|
|
- name: Run tests
|
|
run: nix develop -c cargo test -- --show-output
|
|
|
|
e2e:
|
|
name: E2E Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install nix
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- name: Setup Nix cache
|
|
uses: nix-community/cache-nix-action@main
|
|
with:
|
|
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
|
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
|
|
- name: Cache Cargo artifacts
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-e2e
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Run E2E tests
|
|
run: nix develop -c cargo test --features e2e --test e2e -- --show-output
|