diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c434d68 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + Lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install stable Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + + - name: Fmt + run: cargo fmt --check + + - name: Clippy + run: cargo clippy -- -D warnings + + Test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install stable Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: clippy + + - name: Run tests + run: cargo test --all-features -- --nocapture