rusty_falcon 0.7.1

Rust bindings for CrowdStrike Falcon API
Documentation
name: checks

env:
  CARGO_TERM_COLOR: always

on:
  workflow_dispatch:
  pull_request:

permissions:
  contents: read

jobs:
  fmt:
    runs-on: ubuntu-latest
    name: stable / fmt
    timeout-minutes: 60
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          submodules: true
      - name: Install stable
        uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
        with:
          components: rustfmt
      - name: cargo fmt --check
        run: cargo fmt --check

  clippy:
    runs-on: ubuntu-latest
    name: ${{ matrix.toolchain }} / clippy
    timeout-minutes: 60
    permissions:
      contents: read
      checks: write
    strategy:
      fail-fast: false
      matrix:
        toolchain: [stable, beta]
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          submodules: true
      - name: Install ${{ matrix.toolchain }}
        uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
        with:
          toolchain: ${{ matrix.toolchain }}
          components: clippy
      - name: cargo clippy
      # Run clippy with all warnings treated as errors
      # TODO: Run pedantic
        run: cargo clippy  --  -Dwarnings -Aclippy::single-match-else -Adeprecated

  doc:
    runs-on: ubuntu-latest
    name: nightly / doc
    timeout-minutes: 60
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          submodules: true
      - name: Install nightly
        uses: dtolnay/rust-toolchain@881ba7bf39a41cda34ac9e123fb41b44ed08232f # nightly
      - name: cargo doc
        run: cargo doc --no-deps --all-features
        env:
          RUSTDOCFLAGS: --cfg docsrs

  hack:
  # Provides some checks for mixed versions of dependencies.
    runs-on: ubuntu-latest
    name: ubuntu / stable / features
    timeout-minutes: 60
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          submodules: true
      - name: Install stable
        uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
      - name: cargo install cargo-hack
        uses: taiki-e/install-action@a7fa03c57b89ccd21bda1f7be04bdec8e452f4d7 # cargo-hack
      - name: cargo hack
        run: cargo hack --feature-powerset check

  msrv:
    runs-on: ubuntu-latest
    # we use a matrix here just because env can't be used in job names
    # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
    strategy:
      matrix:
        msrv: [1.88.0]
    name: ubuntu / ${{ matrix.msrv }}
    timeout-minutes: 60
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          submodules: true
      - name: Install ${{ matrix.msrv }}
        uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
        with:
          toolchain: ${{ matrix.msrv }}
      - name: cargo +${{ matrix.msrv }} check
        run: cargo check

  outdated:
    name: Outdated
    runs-on: ubuntu-latest
    timeout-minutes: 60
    if: github.event_name != 'pull_request'
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
      - run: cargo outdated --exit-code 1

  block-fixup:
    name: Block fixup commits
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - name: Checkout
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

      - name: Block Fixup Commit Merge
        # https://github.com/13rac1/block-fixup-merge-action
        uses: 13rac1/block-fixup-merge-action@bd5504fb9ca0253e109d98eb86b7debc01970cdc # v2.0.0

  cargo-sort:
    name: Run cargo sort
    runs-on: ubuntu-latest
    timeout-minutes: 60

    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - name: Checkout
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

      - name: Install stable
        uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable

      - name: Install cargo sort
        run: cargo install cargo-sort

      - name: Cargo sort
        run: cargo sort -w . --check

  cargo-fmt:
    name: Run cargo fmt
    runs-on: ubuntu-latest
    timeout-minutes: 60

    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - name: Checkout
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

      - name: Install nightly
        uses: dtolnay/rust-toolchain@881ba7bf39a41cda34ac9e123fb41b44ed08232f # nightly
        with:
          components: rustfmt

      - name: Cargo fmt --version
        run: cargo fmt --version

      - name: Cargo fmt
        run: cargo fmt -- --check

  cargo-audit:
    name: Run cargo audit
    runs-on: ubuntu-latest
    timeout-minutes: 60

    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
        with:
          egress-policy: audit

      - name: Checkout
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

      - name: Install stable
        uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable

      - name: Install cargo audit
        run: cargo install cargo-audit --locked

      - name: Cargo audit
        run: cargo audit

  shellcheck:
    name: Shellcheck
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
      with:
        egress-policy: audit

    - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
    - name: Run ShellCheck
      uses: ludeeus/action-shellcheck@00b27aa7cb85167568cb48a3838b75f4265f2bca # master

  typos:
    name: Spell Check with Typos
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
      with:
        egress-policy: audit

    - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
    - uses: crate-ci/typos@bbaefadf97b0ec5fdc942684b647f1a6ab250274 # v1.46.0
      continue-on-error: true
    - run: exit 0