34 lines
674 B
YAML
34 lines
674 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ dev, main ]
|
|
pull_request:
|
|
branches: [ dev, main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache cargo registry and target
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install components
|
|
run: rustup component add clippy rustfmt
|
|
|
|
- name: Cargo fmt
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --workspace --all --locked
|
|
|