Skip to content

Upgrade checkout action #2

Upgrade checkout action

Upgrade checkout action #2

Workflow file for this run

name: Formatting
on:
push:
branches: [ main ]
paths:
- "src/**/*.rs"
- "Cargo.toml"
- ".github/workflows/fmt.yml"
pull_request:
branches: [ main ]
paths:
- "src/**/*.rs"
- "Cargo.toml"
- ".github/workflows/fmt.yml"
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt:
name: Verify code formatting
runs-on: ubuntu-latest
steps:
- name: VCS Checkout
uses: actions/checkout@v4
- name: Install rust (latest stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: "fmt"
args: "--all -- --check"