Skip to content

Commit 24111ec

Browse files
committed
fixup! CI: Move fmt test to its previous place
1 parent d3b0502 commit 24111ec

File tree

3 files changed

+49
-51
lines changed

3 files changed

+49
-51
lines changed

.github/workflows/clippy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727

2828
jobs:
2929
base:
30+
# NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
3031
runs-on: ubuntu-latest
3132

3233
steps:
@@ -64,8 +65,8 @@ jobs:
6465
run: cargo test --features deny-warnings
6566
working-directory: rustc_tools_util
6667

67-
- name: Test clippy_dev
68-
run: cargo test --features deny-warnings
68+
- name: Test clippy_dev and lintcheck
69+
run: cargo test --features lintcheck,deny-warnings
6970
working-directory: clippy_dev
7071

7172
- name: Test cargo-clippy

.github/workflows/clippy_bors.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272

7373
runs-on: ${{ matrix.os }}
7474

75+
# NOTE: If you modify this job, make sure you copy the changes to clippy.yml
7576
steps:
7677
# Setup
7778
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
@@ -112,6 +113,9 @@ jobs:
112113
- name: Build
113114
run: cargo build --features deny-warnings,internal-lints
114115

116+
- name: Test "--fix -Zunstable-options"
117+
run: cargo run --features deny-warnings,internal-lints --bin cargo-clippy -- clippy --fix -Zunstable-options
118+
115119
- name: Test
116120
run: cargo test --features deny-warnings,internal-lints
117121

@@ -123,8 +127,8 @@ jobs:
123127
run: cargo test --features deny-warnings
124128
working-directory: rustc_tools_util
125129

126-
- name: Test clippy_dev
127-
run: cargo test --features deny-warnings
130+
- name: Test clippy_dev and lintcheck
131+
run: cargo test --features lintcheck,deny-warnings
128132
working-directory: clippy_dev
129133

130134
- name: Test cargo-clippy
@@ -136,6 +140,13 @@ jobs:
136140
env:
137141
OS: ${{ runner.os }}
138142

143+
- name: Test cargo dev new lint
144+
run: |
145+
cargo dev new_lint --name new_early_pass --pass early
146+
cargo dev new_lint --name new_late_pass --pass late
147+
cargo check
148+
git reset --hard HEAD
149+
139150
integration_build:
140151
needs: changelog
141152
runs-on: ubuntu-latest

.github/workflows/clippy_dev.yml

Lines changed: 33 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
pull_request:
99
# Only run on paths, that get checked by the clippy_dev tool
1010
paths:
11-
- "CHANGELOG.md"
12-
- "README.md"
13-
- "**.stderr"
14-
- "**.rs"
11+
- 'CHANGELOG.md'
12+
- 'README.md'
13+
- '**.stderr'
14+
- '**.rs'
1515

1616
env:
1717
RUST_BACKTRACE: 1
@@ -21,49 +21,35 @@ jobs:
2121
runs-on: ubuntu-latest
2222

2323
steps:
24-
# Setup
25-
- name: Checkout
26-
uses: actions/[email protected]
27-
28-
# To test formatting, we need to temporarily disable the rust-toolchain file
29-
- name: remove toolchain file
30-
run: rm rust-toolchain
31-
32-
- name: rust-toolchain
33-
uses: actions-rs/[email protected]
34-
with:
35-
toolchain: nightly
36-
target: x86_64-unknown-linux-gnu
37-
profile: minimal
38-
components: rustfmt
39-
default: true
40-
41-
# Run
42-
- name: Build
43-
run: cargo build --features deny-warnings
44-
working-directory: clippy_dev
45-
46-
- name: Test limit_stderr_length
47-
run: cargo dev limit_stderr_length
48-
49-
- name: Test update_lints
50-
run: cargo dev update_lints --check
51-
52-
- name: Test fmt
53-
run: cargo dev fmt --check
54-
55-
# Restore the rust-toolchain-file
56-
- name: Restore rust-toolchain-file
57-
run: git checkout rust-toolchain
58-
59-
# Lintcheck
60-
- name: build lintcheck
61-
run: cargo build --features lintcheck,deny-warnings
62-
working-directory: clippy_dev
63-
64-
- name: test lintcheck
65-
run: cargo test --features lintcheck,deny-warnings
66-
working-directory: clippy_dev
24+
# Setup
25+
- name: Checkout
26+
uses: actions/[email protected]
27+
28+
- name: remove toolchain file
29+
run: rm rust-toolchain
30+
31+
- name: rust-toolchain
32+
uses: actions-rs/[email protected]
33+
with:
34+
toolchain: nightly
35+
target: x86_64-unknown-linux-gnu
36+
profile: minimal
37+
components: rustfmt
38+
default: true
39+
40+
# Run
41+
- name: Build
42+
run: cargo build --features deny-warnings
43+
working-directory: clippy_dev
44+
45+
- name: Test limit_stderr_length
46+
run: cargo dev limit_stderr_length
47+
48+
- name: Test update_lints
49+
run: cargo dev update_lints --check
50+
51+
- name: Test fmt
52+
run: cargo dev fmt --check
6753

6854
# These jobs doesn't actually test anything, but they're only used to tell
6955
# bors the build completed, as there is no practical way to detect when a

0 commit comments

Comments
 (0)