Skip to content

Select a proper version of cargo-vet #80

Select a proper version of cargo-vet

Select a proper version of cargo-vet #80

Workflow file for this run

name: CI
on:
push:
# Don't build tags; that's redundant with pushes to main normally.
tags-ignore: "*"
# Only build main, for all other branches rely on pull requests. This
# avoids duplicate builds for pull requests.
branches: main
# Don't build for trivial changes
paths-ignore:
- "*.md"
- "LICENSE"
pull_request:
jobs:
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
cargo-vet:
name: Vet Dependencies
runs-on: ubuntu-latest
env:
CARGO_VET_VERSION: "0.9.1"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v2
with:
path: ${{ runner.tool_cache }}/cargo-vet
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }}
- run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
- run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
- run: cargo vet --locked
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust:
# Our minimal supported version
- "1.64.0"
# The standard Rust version
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy,rustfmt
- run: cargo test
# Run tests with fixed hostname on Unix systems
- run: sudo hostname hostname-for-testing
if: "!contains(matrix.os, 'windows')"
- run: cargo test -- --ignored
if: "!contains(matrix.os, 'windows')"
- run: cargo clippy --all-targets
if: matrix.rust == 'stable'
- run: cargo fmt --check
if: matrix.rust == 'stable'
- run: cargo doc