35 lines
736 B
YAML
35 lines
736 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
name: Test & Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check code formatting
|
|
run: cargo fmt --check
|
|
|
|
- name: Clippy linting
|
|
run: cargo clippy --all-targets -- -D warnings
|
|
|
|
- name: Run unit and integration tests
|
|
run: cargo test --locked
|
|
|
|
- name: Run catalog check dry-run
|
|
run: cargo run --locked -- --check
|