name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
repository-hygiene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python3 scripts/check-repo-hygiene-test.py
- run: python3 scripts/check-repo-hygiene.py
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features: [default, web]
steps:
- uses: actions/checkout@v4
- run: bash .github/scripts/check-changelog.sh
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build, test and lint
shell: bash
run: |
args=()
if [[ '${{ matrix.features }}' == web ]]; then
args+=(--features web)
fi
cargo build --locked --release "${args[@]}"
cargo test --locked --workspace "${args[@]}"
cargo clippy --locked "${args[@]}" -- -D warnings