Skip to content

Commit

Permalink
Split linting and formatting jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed May 8, 2024
1 parent 6d7529c commit 36d27e0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Rust formatting
on:
pull_request:
paths:
- .github/workflows/*.yml
- '**/*.rs'
workflow_dispatch:
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: rustfmt
override: true

- name: Check formatting
run: |
rustfmt --version
cargo fmt -- --check
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Rust linting and formatting
---
name: Rust linting
on:
pull_request:
paths:
Expand All @@ -24,19 +25,3 @@ jobs:
run: |
time cargo clippy --locked --all-targets --no-default-features
time cargo clippy --locked --all-targets --all-features
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: rustfmt
override: true

- name: Check formatting
run: |
rustfmt --version
cargo fmt -- --check

0 comments on commit 36d27e0

Please sign in to comment.