0e1eafc81e
- ci.yaml : cargo check + clippy (-D warnings) + fmt + tests sur push/PR main - release.yaml : build cross (amd64/arm64/armv7) via cross-rs, création release Gitea avec binaires nommés par architecture sur tag v* - ROADMAP Phase 5 marquée complète Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
check:
|
|
name: Vérification & lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Cache Cargo
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
|
restore-keys: ${{ runner.os }}-cargo-
|
|
|
|
- name: Installation Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Vérification compilation (cargo check)
|
|
run: cargo check --workspace
|
|
|
|
- name: Lint (cargo clippy)
|
|
run: cargo clippy --workspace -- -D warnings
|
|
|
|
- name: Format (cargo fmt)
|
|
run: cargo fmt --all -- --check
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target/
|
|
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Tests (cargo test)
|
|
run: cargo test --workspace
|
|
env:
|
|
DATABASE_URL: sqlite://:memory:
|