-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bring the CI config to 2024 * Fix doc warnings
- Loading branch information
Showing
2 changed files
with
76 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,86 @@ | ||
on: [push, pull_request] | ||
|
||
name: ci | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-D warnings" | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run cargo check | ||
run: cargo check --all-targets --all-features | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
rust: [stable] | ||
include: | ||
- os: ubuntu-latest | ||
rust: nightly | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
toolchain: ${{ matrix.rust }} | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run tests | ||
run: cargo test --all-targets --all-features | ||
- name: Run doc tests | ||
run: cargo test --doc | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
components: rustfmt | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
components: clippy | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features | ||
|
||
docs: | ||
name: Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Check documentation | ||
env: | ||
RUSTDOCFLAGS: "-D warnings" | ||
run: cargo doc --no-deps --document-private-items |
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