diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8ea36dc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: Run checks + +on: + push: + branches: ["main"] + pull_request: + branches-ignore: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Rust Toolchain for GitHub CI + uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 + with: + components: clippy, rustfmt + - name: Check + run: cargo check --all-targets --all-features + - name: Format + run: cargo fmt --all -- --check + - name: Clippy + run: cargo clippy --all-targets --all-features -- -D warnings + - name: Test + run: cargo test --all-features