diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..349fb27 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint and format check + +on: [ pull_request ] + +permissions: + contents: read + +env: + RUSTFLAGS: "-Dwarnings" # treat warnings as errors + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository. + uses: actions/checkout@v6 + + - name: Run Clippy. + run: cargo clippy --all-targets --all-features + + - name: Run fmt check. + run: cargo fmt --all -- --check