Merge pull request #27 from artrixdotdev/feat/custom-errors #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ✅ Checks | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-C target-cpu=native" | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout code | |
| 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 | |
| with: | |
| shared-key: "build-cache" | |
| - name: 🔨 Build | |
| run: cargo build --verbose | |
| - name: 🧪 Run tests | |
| run: cargo test --verbose | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout code | |
| 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 | |
| with: | |
| shared-key: "lint-cache" | |
| - name: 🔍 Run linter | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: 💅 Run format checker | |
| run: cargo fmt --check |