feat: change api to make more use cases easier #75
This file contains hidden or 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 General | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| workflow_call: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| RUSTDOCFLAGS: -D warnings | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: wykies/checkout@main | |
| - uses: wykies/setup-rust-toolchain@main | |
| - name: Run examples | |
| run: cargo test --all-features --examples | |
| - name: Run tests | |
| run: cargo test --all-features | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: wykies/checkout@main | |
| - uses: wykies/setup-rust-toolchain@main | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - name: Enforce formatting | |
| run: cargo fmt --all --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: wykies/checkout@main | |
| - uses: wykies/setup-rust-toolchain@main | |
| with: | |
| components: clippy | |
| - name: Linting | |
| run: cargo clippy --all-features -- -D warnings |