From a046524b34cfe7075dce2cfacfd53488bba0d997 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Wed, 10 Jul 2024 00:14:43 +0900 Subject: [PATCH] add binary run test to github workflow --- .github/workflows/rust.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index beae7286..e37e6672 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,18 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build run: cargo build --verbose + - name: Run tests run: cargo test --verbose + - name: Run binary for test purpose + run: | + set -e + cargo run --profile dev -- --profile dev + test -f target/generate-rpm/cargo-generate-rpm-*.rpm + rm -f target/generate-rpm/cargo-generate-rpm-*.rpm + cargo run --release -- generate-rpm + test -f target/generate-rpm/cargo-generate-rpm-*.rpm + rm -f target/generate-rpm/cargo-generate-rpm-*.rpm + - name: Package run: cargo package