From 2dfaa8d428cfa05c51a9536f5e90ed427ae9e114 Mon Sep 17 00:00:00 2001 From: Victor Mignot Date: Thu, 22 Sep 2022 00:06:28 -0400 Subject: [PATCH] Basic Rust CI --- .github/workflows/code-quality.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/code-quality.yml 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