Fixup cli to handle parsing matches when called as a cargo subcommand #315
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
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 | |
shell: bash -xe {0} | |
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 | |
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 |