Skip to content

Update GitHub Artifact Actions (major) #95

Update GitHub Artifact Actions (major)

Update GitHub Artifact Actions (major) #95

Workflow file for this run

name: Style
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- trunk
workflow_dispatch:
env:
name: row
CARGO_TERM_COLOR: always
CLICOLOR: 1
jobs:
cargo-check:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Configure Rust
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
with:
toolchain: 1.89.0
- name: Cache
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
cache-bin: false
- run: cargo check --all-targets --all-features
cargo-clippy:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Configure Rust
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
with:
toolchain: 1.89.0
components: clippy
- name: Cache
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
cache-bin: false
- run: cargo clippy --all-targets --all-features -- -Dwarnings
cargo-fmt:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Configure Rust
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
with:
toolchain: 1.89.0
components: rustfmt
- run: cargo fmt --check
prek:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: prek
uses: glotzerlab/workflows/prek@894d9678188a02b06560fdeb2b9ba98d016cd371 # 0.10.0
# This job is used to provide a single requirement for branch merge conditions.
tests_complete:
name: All style checks
if: always()
needs: [cargo-check, cargo-clippy, cargo-fmt, prek]
runs-on: ubuntu-24.04
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0