name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
qa:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
timeout-minutes: 3
run: cargo fmt --check --all
- name: Run clippy
timeout-minutes: 5
run: cargo clippy --all-targets -- -D warnings
- name: Run tests
timeout-minutes: 10
run: cargo test