]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/.github/workflows/clippy_dev.yml
New upstream version 1.61.0+dfsg1
[rustc.git] / src / tools / clippy / .github / workflows / clippy_dev.yml
1 name: Clippy Dev Test
2
3 on:
4 push:
5 branches:
6 - auto
7 - try
8 pull_request:
9 # Only run on paths, that get checked by the clippy_dev tool
10 paths:
11 - 'CHANGELOG.md'
12 - 'README.md'
13 - '**.stderr'
14 - '**.rs'
15
16 env:
17 RUST_BACKTRACE: 1
18
19 jobs:
20 clippy_dev:
21 runs-on: ubuntu-latest
22
23 steps:
24 # Setup
25 - name: Checkout
26 uses: actions/checkout@v2.3.3
27
28 # Run
29 - name: Build
30 run: cargo build --features deny-warnings
31 working-directory: clippy_dev
32
33 - name: Test update_lints
34 run: cargo dev update_lints --check
35
36 - name: Test fmt
37 run: cargo dev fmt --check
38
39 - name: Test cargo dev new lint
40 run: |
41 cargo dev new_lint --name new_early_pass --pass early
42 cargo dev new_lint --name new_late_pass --pass late
43 cargo check
44 git reset --hard HEAD
45
46 # These jobs doesn't actually test anything, but they're only used to tell
47 # bors the build completed, as there is no practical way to detect when a
48 # workflow is successful listening to webhooks only.
49 #
50 # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
51
52 end-success:
53 name: bors dev test finished
54 if: github.event.pusher.name == 'bors' && success()
55 runs-on: ubuntu-latest
56 needs: [clippy_dev]
57
58 steps:
59 - name: Mark the job as successful
60 run: exit 0
61
62 end-failure:
63 name: bors dev test finished
64 if: github.event.pusher.name == 'bors' && (failure() || cancelled())
65 runs-on: ubuntu-latest
66 needs: [clippy_dev]
67
68 steps:
69 - name: Mark the job as a failure
70 run: exit 1