pathscheme 0.2.1

A basic path matching language
Documentation
name: Check

on:
  pull_request:
    paths:
      - .github/workflows/check.yml
      - Cargo.*
      - "**/*.rs"

env:
  CARGO_ACTION_FMT_VERSION: v0.1.3
  CARGO_INCREMENTAL: 0
  CARGO_NET_RETRY: 10
  RUST_BACKTRACE: short
  RUSTUP_MAX_RETRIES: 10

jobs:
  clippy:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    container:
      image: docker://rust:1.60-bullseye
    steps:
      - run: rustup component add clippy
      - run: |
          curl --proto '=https' --tlsv1.3 -fsSLvo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu"
          chmod 755 /usr/local/bin/cargo-action-fmt
      - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
      - run: cargo fetch
      - run: cargo clippy --all-targets --all-features --message-format=json | cargo-action-fmt

  fmt:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    container:
      image: docker://rust:1.60-bullseye
    steps:
      - run: rustup component add rustfmt
      - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
      - run: cargo fmt -- --check

  test:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    container:
      image: docker://rust:1.60-bullseye
    steps:
      - run: |
          curl --proto '=https' --tlsv1.3 -fsSLvo /usr/local/bin/cargo-action-fmt "https://github.com/olix0r/cargo-action-fmt/releases/download/release%2F${CARGO_ACTION_FMT_VERSION}/cargo-action-fmt-x86_64-unknown-linux-gnu"
          chmod 755 /usr/local/bin/cargo-action-fmt
      - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
      - run: cargo fetch
      - run: cargo test --frozen --no-run --message-format=json | cargo-action-fmt
      - run: cargo test --frozen

  deny:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    strategy:
      matrix:
        checks:
          - advisories
          - bans licenses sources
    # Prevent sudden announcement of a new advisory from failing Ci.
    continue-on-error: ${{ matrix.checks == 'advisories' }}
    steps:
      - uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
      - uses: EmbarkStudios/cargo-deny-action@ccfac4e084d1dedad50125be4550f87a21ba181e
        with:
          command: check ${{ matrix.checks }}