Skip to content

CLI Interface for fake-rs #329

CLI Interface for fake-rs

CLI Interface for fake-rs #329

Workflow file for this run

name: Rust
on:
push:
branches: [ master ]
paths:
- "**.rs"
- "**/Cargo.toml"
- ".github/workflows/**"
pull_request:
branches: [ master ]
paths:
- "**.rs"
- "**/Cargo.toml"
- ".github/workflows/**"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all-features --verbose
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --tests --examples -- -D warnings
cli:
name: Fake-CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin fake --features clap
- name: Upload Bin Artifact
uses: actions/upload-artifact@v4
with:
name: fake
path: target/release/fake