Skip to content

Commit

Permalink
chore: split out linting from ci-pr workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Jul 9, 2024
1 parent 9fd3cd3 commit b65fffd
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 34 deletions.
36 changes: 2 additions & 34 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ concurrency:
cancel-in-progress: true

jobs:
ci-pr:
name: CI-PR
needs: [test-full, test-minimal, lint]
runs-on: ubuntu-latest
steps:
- name: Done
run: exit 0
test-full:
name: Tests
name: Tests (full)
strategy:
fail-fast: false
matrix:
Expand All @@ -39,7 +32,7 @@ jobs:
- name: Test
run: cargo test --all-features
test-minimal:
name: Tests
name: Tests (Min)
strategy:
fail-fast: false
matrix:
Expand All @@ -61,28 +54,3 @@ jobs:
run: cargo test --no-run --no-default-features
- name: Test
run: cargo test --no-default-features
lint:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master
with:
config: ./.typos.toml

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Clippy
run: cargo clippy --all-features --all-targets

- name: Format Check
run: cargo fmt --check


42 changes: 42 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Lint

on:
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master
with:
config: ./.typos.toml

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Clippy
run: cargo clippy --all-features --all-targets

- name: Format Check
run: cargo fmt --check
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.67.1

- name: Check
run: cargo check

0 comments on commit b65fffd

Please sign in to comment.