Finish 0.1.4 #36
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- master | |
paths: | |
- 'Cargo.toml' | |
- 'src/**' | |
- '.codespellrc' | |
- '.github/workflows/rust.yml' | |
pull_request: | |
branches: | |
- main | |
- master | |
paths: | |
- 'Cargo.toml' | |
- 'src/**' | |
- '.codespellrc' | |
- '.github/workflows/rust.yml' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
codespell: | |
name: Check for spelling mistakes | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Codespell | |
uses: codespell-project/actions-codespell@v2 | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check format | |
run: cargo fmt --check | |
- name: Clippy | |
run: cargo clippy --all-features | |
docs: | |
name: Build documentation | |
needs: | |
- codespell | |
- lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build documentation | |
run: cargo doc --all-features | |
build-linux: | |
name: Build on Linux | |
needs: | |
- lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
features: [ [ ], [ "--all-features" ], [ "--no-default-features" ] ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clippy | |
run: cargo clippy ${{ join(matrix.features, ' ') }} | |
- name: Build | |
run: cargo build --verbose ${{ join(matrix.features, ' ') }} | |
- name: Run doctests | |
run: cargo test --doc --verbose ${{ join(matrix.features, ' ') }} | |
- name: Run regular tests | |
run: cargo test --tests --verbose ${{ join(matrix.features, ' ') }} |