]> git.lizzy.rs Git - rust.git/blob - .github/workflows/clippy_dev.yml
Stop caching on CI
[rust.git] / .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 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
53
54   # These jobs doesn't actually test anything, but they're only used to tell
55   # bors the build completed, as there is no practical way to detect when a
56   # workflow is successful listening to webhooks only.
57   #
58   # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
59
60   end-success:
61     name: bors dev test finished
62     if: github.event.pusher.name == 'bors' && success()
63     runs-on: ubuntu-latest
64     needs: [clippy_dev]
65
66     steps:
67       - name: Mark the job as successful
68         run: exit 0
69
70   end-failure:
71     name: bors dev test finished
72     if: github.event.pusher.name == 'bors' && (failure() || cancelled())
73     runs-on: ubuntu-latest
74     needs: [clippy_dev]
75
76     steps:
77       - name: Mark the job as a failure
78         run: exit 1