Merge pull request #322 from umccr/docs/changelog #394
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
permissions: | |
contents: read | |
pull-requests: write | |
runs-on: ${{ matrix.os }} | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
strategy: | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest] | |
steps: | |
- name: Cache | |
uses: mozilla-actions/[email protected] | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- run: rustup override set ${{ steps.toolchain.outputs.name }} | |
- name: Install pre-commit | |
run: pip3 install pre-commit | |
- name: Run pre-commit | |
run: pre-commit run --all-files | |
- name: Cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Cargo clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
- name: Run doc changes test | |
run: ./generate.sh && git add . && git diff --quiet && git diff --cached --quiet | |
working-directory: htsget-config/docs | |
- name: Run cargo tests | |
run: cargo test --all-features | |
- name: Run cargo tests with no default features | |
run: cargo test --no-default-features |