Skip to content

Refactor and clean the code #245

Refactor and clean the code

Refactor and clean the code #245

Workflow file for this run

name: Code quality and sanity
on:
push:
branches: 'main'
pull_request:
branches: '*'
jobs:
clippy:
name: Lint with Clippy
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v3
- name: Caching project dependencies
id: project-cache
uses: Swatinem/rust-cache@v2
- uses: hecrj/setup-rust-action@v1
with:
components: clippy
- name: Verifiying the code quality with Clippy
working-directory: zork++
run: |
cargo clippy --all-targets --all-features
rustfmt:
name: Verify code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Caching project dependencies
id: project-cache
uses: Swatinem/rust-cache@v2
- uses: hecrj/setup-rust-action@v2
with:
components: rustfmt
- name: Checking the format sanity of the project
working-directory: zork++
run: |
cargo fmt --all -- --check
unit-and-doc-tests:
name: Verify code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Caching project dependencies
id: project-cache
uses: Swatinem/rust-cache@v2
- uses: hecrj/setup-rust-action@v2
with:
components: rustfmt
- name: Run Unit and Doc tests
working-directory: zork++
run: |
cargo test --workspace --lib --color=always --no-fail-fast
cargo test --workspace --doc --color=always --no-fail-fast