Update dependencies #127
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
--- | |
# Main "useful" actions config file | |
# Cache config comes from https://github.com/actions/cache/blob/main/examples.md#rust---cargo | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
name: Rust Validation | |
env: | |
RUSTDOCFLAGS: -D warnings | |
RUSTFLAGS: -D warnings | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
jobs: | |
clippy: | |
name: "Clippy (cargo clippy)" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --all-features --all-targets -- -D warnings | |
- run: cargo clippy --no-default-features --all-targets -- -D warnings | |
test: | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- build: linux | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
extension: '' | |
- build: macos | |
os: macos-latest | |
target: x86_64-apple-darwin | |
extension: '' | |
- build: windows-msvc | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
name: "Test on ${{ matrix.os }} (cargo test)" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- uses: dtolnay/rust-toolchain@1.70.0 | |
with: | |
components: llvm-tools-preview | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- run: cargo llvm-cov nextest --no-fail-fast --lcov --output-path lcov.info | |
- run: cargo test --doc | |
- name: Upload coverage data to codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: lcov.info | |
fmt: | |
name: "Format (cargo fmt)" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --all -- --check | |
- uses: actions/setup-python@v3 | |
doc: | |
name: "Docs (cargo doc)" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo doc | |
outdated: | |
name: Outdated | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/install@cargo-outdated | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo outdated --workspace --exit-code 1 --ignore rust-ini |