]> git.lizzy.rs Git - rust.git/blob - .github/workflows/clippy_dev.yml
Add bors dummy jobs
[rust.git] / .github / workflows / clippy_dev.yml
1 name: Clippy Dev Test
2
3 on:
4   # Only run on paths, that get checked by the clippy_dev tool
5   push:
6     paths:
7     - 'CAHNGELOG.md'
8     - 'README.md'
9     - '**.stderr'
10     - '**.rs'
11   pull_request:
12     paths:
13     - 'CAHNGELOG.md'
14     - 'README.md'
15     - '**.stderr'
16     - '**.rs'
17
18 env:
19   RUST_BACKTRACE: 1
20
21 jobs:
22   clippy_dev:
23     runs-on: ubuntu-latest
24
25     steps:
26     - name: rust-toolchain
27       uses: actions-rs/toolchain@v1.0.3
28       with:
29         toolchain: nightly
30         target: x86_64-unknown-linux-gnu
31         profile: minimal
32         components: rustfmt
33     - name: Checkout
34       uses: actions/checkout@v2.0.0
35
36     - name: Build
37       run: cargo build --features deny-warnings
38       working-directory: clippy_dev
39     - name: Test limit-stderr-length
40       run: cargo dev --limit-stderr-length
41     - name: Test update_lints
42       run: cargo dev update_lints --check
43     - name: Test fmt
44       run: cargo dev fmt --check
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