Skip to content

chore: release

chore: release #2873

Workflow file for this run

---
name: Linters
permissions:
contents: read
on:
push:
branches: ["main" ]
pull_request:
branches: ["main" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/linters.yml'
- 'openstack_cli/**'
- 'openstack_sdk/**'
- 'openstack_tui/**'
- 'openstack_types/**'
- 'fuzz/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt:
name: Run rustfmt on the latest supported toolchain
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable
with:
toolchain: stable
components: rustfmt
- uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- name: Run rustfmt
run: cargo fmt -- --check
clippy:
name: Run clippy on the minimum supported toolchain
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
strategy:
matrix:
include:
- rust_ver: 1.76
clippy_args: "-p openstack_sdk -p openstack_types"
- rust_ver: 1.85
clippy_args: "-p openstack_cli -p openstack_tui"
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust ${{ matrix.rust_ver }}
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable
with:
toolchain: ${{ matrix.rust_ver }}
components: rustfmt, clippy
- uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- name: Install cargo-binstall
uses: taiki-e/install-action@f1390fd0d8205ae79e5e57b1d1e300dceeb4163e # v2.49.44
with:
tool: cargo-binstall
- name: Install required cargo
run: cargo binstall clippy-sarif sarif-fmt --force
- name: Run rust-clippy
run:
cargo clippy
--lib --tests
--all-features ${{ matrix.clippy_args }}
--message-format=json | ${CARGO_HOME}/bin/clippy-sarif | tee rust-clippy-results.sarif | ${CARGO_HOME}/bin/sarif-fmt
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
typos:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Checkout Actions Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check spelling of file.txt
uses: crate-ci/typos@0f0ccba9ed1df83948f0c15026e4f5ccfce46109 # v1.32.0
with:
config: typos.toml