]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/.github/workflows/clippy_dev.yml
Auto merge of #88615 - flip1995:clippyup, r=Manishearth
[rust.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     - name: remove toolchain file
29       run: rm rust-toolchain
30
31     - name: rust-toolchain
32       uses: actions-rs/toolchain@v1.0.6
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 update_lints
46       run: cargo dev update_lints --check
47
48     - name: Test fmt
49       run: cargo dev fmt --check
50
51   # These jobs doesn't actually test anything, but they're only used to tell
52   # bors the build completed, as there is no practical way to detect when a
53   # workflow is successful listening to webhooks only.
54   #
55   # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
56
57   end-success:
58     name: bors dev test finished
59     if: github.event.pusher.name == 'bors' && success()
60     runs-on: ubuntu-latest
61     needs: [clippy_dev]
62
63     steps:
64       - name: Mark the job as successful
65         run: exit 0
66
67   end-failure:
68     name: bors dev test finished
69     if: github.event.pusher.name == 'bors' && (failure() || cancelled())
70     runs-on: ubuntu-latest
71     needs: [clippy_dev]
72
73     steps:
74       - name: Mark the job as a failure
75         run: exit 1