From 058ff012b8524c15d4d68302f4feae40dc6528b9 Mon Sep 17 00:00:00 2001 From: ghoscht Date: Fri, 20 Dec 2024 23:43:04 +0100 Subject: [PATCH] Update .forgejo/workflows/rust.yml --- .forgejo/workflows/rust.yml | 50 ++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/.forgejo/workflows/rust.yml b/.forgejo/workflows/rust.yml index d02da0c..da9bb71 100644 --- a/.forgejo/workflows/rust.yml +++ b/.forgejo/workflows/rust.yml @@ -1,14 +1,46 @@ ---- -name: "Test Suite" -on: - push: - pull_request: +on: [push, pull_request] + +name: Continuous integration jobs: - test: - name: cargo test + check: + name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: https://github.com/actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo test --all-features \ No newline at end of file + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo check + + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo test + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: rustup component add rustfmt + - run: cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: rustup component add clippy + - run: cargo clippy -- -D warnings + + build: + name: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo build \ No newline at end of file