Initial commit #6
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: | | |
| cargo fmt --all --check | |
| cargo fmt --manifest-path examples/gitbot/Cargo.toml --check | |
| cargo fmt --manifest-path examples/card_bot/Cargo.toml --check | |
| - name: Run unit tests | |
| run: cargo test --workspace --all-features --lib | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Test standalone examples | |
| run: | | |
| cargo test --manifest-path examples/gitbot/Cargo.toml | |
| cargo test --manifest-path examples/card_bot/Cargo.toml | |
| - name: Check packages | |
| run: cargo package -p refluxer |