slack status without the slack status.zzstoatzz.io/
quickslice

ci: add proper CI workflow and pre-commit config

- Added GitHub Actions CI workflow for PRs
- Added pre-commit configuration (requires pre-commit install)
- CI runs: cargo fmt, build, clippy, and tests
- This will prevent broken code from being merged

+52
+31
.github/workflows/ci.yml
··· 1 + name: CI 2 + 3 + on: 4 + push: 5 + branches: [ main ] 6 + pull_request: 7 + branches: [ main ] 8 + 9 + env: 10 + CARGO_TERM_COLOR: always 11 + 12 + jobs: 13 + test: 14 + name: Test 15 + runs-on: ubuntu-latest 16 + steps: 17 + - uses: actions/checkout@v4 18 + - uses: dtolnay/rust-toolchain@stable 19 + - uses: Swatinem/rust-cache@v2 20 + 21 + - name: Check formatting 22 + run: cargo fmt -- --check 23 + 24 + - name: Build 25 + run: cargo build --verbose 26 + 27 + - name: Run clippy 28 + run: cargo clippy -- -D warnings 29 + 30 + - name: Run tests 31 + run: cargo test --verbose
+21
.pre-commit-config.yaml
··· 1 + repos: 2 + - repo: local 3 + hooks: 4 + - id: cargo-check 5 + name: Cargo check 6 + entry: cargo check 7 + language: system 8 + types: [rust] 9 + pass_filenames: false 10 + - id: cargo-fmt-check 11 + name: Cargo fmt check 12 + entry: cargo fmt -- --check 13 + language: system 14 + types: [rust] 15 + pass_filenames: false 16 + - id: cargo-clippy 17 + name: Cargo clippy 18 + entry: cargo clippy -- -D warnings 19 + language: system 20 + types: [rust] 21 + pass_filenames: false