Skip to content

More idiomatic rust code #21

More idiomatic rust code

More idiomatic rust code #21

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: ${{ matrix.rust-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
rust-version:
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt, clippy
- name: Test compilation
run: cargo check --all --all-targets
- name: Test formatting
run: cargo fmt --all -- --check
# - name: Test clippy
# run: cargo clippy --all --all-targets -- -D warnings
# - name: Test documentation
# run: cargo doc --all --no-deps
- name: Test unit tests
run: cargo test --all-features