From d36562c4599473256c99c2c619f0f2d1dbbab6af Mon Sep 17 00:00:00 2001 From: Oliver <18360865+ost-ing@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:01:46 +0200 Subject: [PATCH] update ci --- .github/workflows/build.yml | 80 +++++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 487d032..56a308b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,18 +1,74 @@ -name: Rust CI -on: - pull_request: - branches: [ main ] +on: [push, pull_request] + +name: Pipeline jobs: - build: + check: + name: Check 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 + + - name: Run cargo check + uses: actions-rs/cargo@v1 + continue-on-error: true # WARNING: only for this example, remove it! + with: + command: check + test: + name: Test Suite + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose \ No newline at end of file + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Run cargo test + uses: actions-rs/cargo@v1 + continue-on-error: true # WARNING: only for this example, remove it! + with: + command: test + + lints: + name: Lints + 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 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 \ No newline at end of file