Skip to content

Commit

Permalink
add binary run test to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cat-in-136 committed Jul 9, 2024
1 parent 1a226c9 commit 278c6fe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ 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: |
cargo run --profile dev -- --profile dev && test -f target/generate-rpm/cargo-generate-rpm-*.rpm && \
rm -f target/generate-rpm/cargo-generate-rpm-*.rpm
- name: Run binary as cargo subcommand for test purpose
run: |
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

0 comments on commit 278c6fe

Please sign in to comment.