Merge pull request #155 from aegoroff/dependabot/cargo/url-eq-2.5.0 #583
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
name: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build: [ linux, macos, windows ] | |
rust: [ stable ] | |
include: | |
- build: linux | |
os: ubuntu-latest | |
- build: macos | |
os: macos-latest | |
- build: windows | |
os: windows-latest | |
steps: | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ matrix.rust }} | |
- uses: actions/checkout@v3 | |
- name: Rust version | |
run: rustup -V | |
- name: Build | |
run: cargo build | |
- name: Run cargo-tarpaulin | |
if: matrix.build == 'linux' | |
uses: actions-rs/tarpaulin@v0.1 | |
with: | |
version: '0.15.0' | |
args: '-- --test-threads 1' | |
- name: Upload to codecov.io | |
if: matrix.build == 'linux' && matrix.rust != 'nightly' | |
uses: codecov/codecov-action@v3 | |
- name: Run tests | |
if: matrix.build != 'linux' | |
run: cargo test --verbose -- --nocapture | |
- name: Setup linter | |
if: matrix.rust == 'nightly' || matrix.build != 'linux' | |
run: rustup component add clippy | |
- name: Run linter | |
if: matrix.rust == 'nightly' || matrix.build != 'linux' | |
run: cargo clippy -- -Dwarnings | |
- name: Run clippy-check | |
if: matrix.rust != 'nightly' && matrix.build == 'linux' | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --release -- -Dwarnings | |
- name: Run audit | |
if: matrix.rust != 'nightly' && matrix.build == 'linux' | |
uses: actions-rs/audit-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |