]> git.lizzy.rs Git - rust.git/blob - .github/workflows/clippy_dev.yml
Run bors checks unconditionally
[rust.git] / .github / workflows / clippy_dev.yml
1 name: Clippy Dev Test
2
3 on:
4   push:
5     branches: [auto, try]
6   pull_request:
7     # Only run on paths, that get checked by the clippy_dev tool
8     paths:
9     - 'CAHNGELOG.md'
10     - 'README.md'
11     - '**.stderr'
12     - '**.rs'
13
14 env:
15   RUST_BACKTRACE: 1
16
17 jobs:
18   clippy_dev:
19     runs-on: ubuntu-latest
20
21     steps:
22     - name: rust-toolchain
23       uses: actions-rs/toolchain@v1.0.3
24       with:
25         toolchain: nightly
26         target: x86_64-unknown-linux-gnu
27         profile: minimal
28         components: rustfmt
29     - name: Checkout
30       uses: actions/checkout@v2.0.0
31
32     - name: Build
33       run: cargo build --features deny-warnings
34       working-directory: clippy_dev
35     - name: Test limit-stderr-length
36       run: cargo dev --limit-stderr-length
37     - name: Test update_lints
38       run: cargo dev update_lints --check
39     - name: Test fmt
40       run: cargo dev fmt --check
41
42   # These jobs doesn't actually test anything, but they're only used to tell
43   # bors the build completed, as there is no practical way to detect when a
44   # workflow is successful listening to webhooks only.
45   #
46   # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
47
48   end-success:
49     name: bors dev test finished
50     if: github.event.pusher.name == 'bors' && success()
51     runs-on: ubuntu-latest
52     needs: [clippy_dev]
53
54     steps:
55       - name: Mark the job as successful
56         run: exit 0
57
58   end-failure:
59     name: bors dev test finished
60     if: github.event.pusher.name == 'bors' && (failure() || cancelled())
61     runs-on: ubuntu-latest
62     needs: [clippy_dev]
63
64     steps:
65       - name: Mark the job as a failure
66         run: exit 1