diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 0000000..a0ab2f7 --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,30 @@ +name: code-quality + +on: + pull_request: + branches: [ "main" ] + push: + branches: [ "main" ] + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Installing Rust toolchain + uses: actions-rs/toolchain@v1 + with: + components: rustfmt, clippy + + - name: Format + run: cargo fmt --check + + - name: Lint + run: cargo clippy + + - name: Tests + run: cargo test + + - name: Build + run: cargo build --verbose