From 073da4b2aef73498e6b79626bc3c93e0187bcc65 Mon Sep 17 00:00:00 2001 From: Mike Rostecki Date: Tue, 6 Jun 2023 10:43:14 +0200 Subject: [PATCH] Add CI tests --- .github/workflows/test.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0f5ecbf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +name: test + +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + continue-on-error: true # WARNING: only for this example, remove it! + with: + command: fmt + args: --all -- --check + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + continue-on-error: true # WARNING: only for this example, remove it! + with: + command: clippy + args: -- -D warnings