Refactor project base #6
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: | ||
branches: | ||
- "master" | ||
pull_request: | ||
branches: | ||
- "master" | ||
- "dev" | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: cargo build --verbose --all-features && ls -sh target/debug/*.rlib | ||
- name: Build single feature | ||
run: | ||
- cargo build --verbose --features=add-ordinal-suffix && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=commas && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=digits && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=find-capital-by-province && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=is-persian && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=national-id && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=remove-ordinal-suffix && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=to-persian-chars && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=url-fix && ls -sh target/debug/*.rlib | ||
- cargo build --verbose --features=verity-card-number && ls -sh target/debug/*.rlib | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check style | ||
run: cargo fmt --check --verbose | ||
- name: Clippy | ||
run: cargo clippy --no-deps --verbose --all-features | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check style | ||
run: cargo doc --all-features --verbose | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Test | ||
run: cargo test --verbose --all-features -- --nocapture |