Skip to content

Merge branch 'master' into fix-114-cant-run-as-cargo-subcommand #308

Merge branch 'master' into fix-114-cant-run-as-cargo-subcommand

Merge branch 'master' into fix-114-cant-run-as-cargo-subcommand #308

Workflow file for this run

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