Skip to content

Commit 1d3ba50

Browse files
committed
ci(lint): switch testing workflow to internal linting tool
1 parent 7085250 commit 1d3ba50

1 file changed

Lines changed: 13 additions & 26 deletions

File tree

.github/workflows/testing.yaml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ jobs:
3333
run: cargo fmt --check
3434

3535
check:
36-
name: Static Analysis
36+
name: Linting
3737
runs-on: ubuntu-latest
3838
needs: format
39+
timeout-minutes: 15
3940

4041
strategy:
4142
matrix:
@@ -51,39 +52,25 @@ jobs:
5152
uses: dtolnay/rust-toolchain@stable
5253
with:
5354
toolchain: ${{ matrix.toolchain }}
54-
components: clippy
55+
components: clippy, rustfmt
56+
57+
- id: node
58+
name: Setup Node.js
59+
uses: actions/setup-node@v5
60+
with:
61+
node-version: "20"
5562

5663
- id: cache
5764
name: Enable Workflow Cache
5865
uses: Swatinem/rust-cache@v2
5966

6067
- id: tools
61-
name: Install Tools
62-
uses: taiki-e/install-action@v2
63-
with:
64-
tool: cargo-machete
65-
66-
- id: check
67-
name: Run Build Checks
68-
run: cargo check --tests --benches --examples --workspace --all-targets --all-features
68+
name: Install Internal Linter
69+
run: cargo install --locked --git https://github.com/torrust/torrust-linting --bin linter
6970

7071
- id: lint
71-
name: Run Lint Checks
72-
run: cargo clippy --tests --benches --examples --workspace --all-targets --all-features
73-
74-
- id: docs
75-
name: Lint Documentation
76-
env:
77-
RUSTDOCFLAGS: "-D warnings"
78-
run: cargo doc --no-deps --bins --examples --workspace --all-features
79-
80-
- id: clean
81-
name: Clean Build Directory
82-
run: cargo clean
83-
84-
- id: deps
85-
name: Check Unused Dependencies
86-
run: cargo machete
72+
name: Run All Linters
73+
run: linter all
8774

8875
build:
8976
name: Build on ${{ matrix.os }} (${{ matrix.toolchain }})

0 commit comments

Comments
 (0)