This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Test & Release | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: '-D warnings' | ||
CARGO_INCREMENTAL: 0 | ||
RUST_BACKTRACE: short | ||
|
||
jobs: | ||
clippy: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run clippy | ||
run: cargo clippy --all-targets -- -D clippy::all -D clippy::nursery | ||
|
||
cargo-fmt: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run cargo fmt | ||
run: cargo fmt --check | ||
|
||
# there're sometimes warnings, which signal, that the generated doc | ||
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being | ||
# generated at release time altogether. | ||
cargo-doc: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: run cargo doc | ||
run: RUSTDOCFLAGS="-D warnings" cargo doc | ||
|
||
test: | ||
needs: cargo-fmt | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
toolchain: [stable] | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "${{ matrix.toolchain }}" | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.toolchain }} | ||
default: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- name: Check with stable features | ||
run: cargo check --verbose | ||
- name: Run tests with unstable features | ||
run: cargo test --verbose |
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