From 3c8c406bb7630158b94674a39e61a53b9c5dbeaf Mon Sep 17 00:00:00 2001 From: semubico Date: Fri, 11 Jul 2025 17:24:36 +0200 Subject: [PATCH] Update .github/workflows/test.yml --- .github/workflows/test.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3db4888..65f5a60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,17 +2,23 @@ name: Compile Rust Code on Release on: [push] -jobs: - build: - runs-on: ubuntu-latest +on: [push] +jobs: + lint&test: + runs-on: ubuntu-latest + container: + image: rust steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Build in Release Mode - run: cargo build --release + # nodejs is required for the checkout action + - run: curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs + - uses: actions/checkout@v4 + - run: rustup component add rustfmt clippy + - run: cargo fmt -- --check + - run: cargo clippy -- -D warnings + - run: cargo check + - run: cargo test + - run: cargo build --release - name: Package Artifacts run: | mkdir -p artifacts