]> git.lizzy.rs Git - rust.git/blob - .github/workflows/clippy_dev.yml
Run deploy workflow on tags, instead of releases
[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     - 'CAHNGELOG.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: rust-toolchain
26       uses: actions-rs/toolchain@v1.0.3
27       with:
28         toolchain: nightly
29         target: x86_64-unknown-linux-gnu
30         profile: minimal
31         components: rustfmt
32
33     - name: Checkout
34       uses: actions/checkout@v2.0.0
35
36     # Run
37     - name: Build
38       run: cargo build --features deny-warnings
39       working-directory: clippy_dev
40
41     - name: Test limit-stderr-length
42       run: cargo dev --limit-stderr-length
43
44     - name: Test update_lints
45       run: cargo dev update_lints --check
46
47     - name: Test fmt
48       run: cargo dev fmt --check
49
50   # These jobs doesn't actually test anything, but they're only used to tell
51   # bors the build completed, as there is no practical way to detect when a
52   # workflow is successful listening to webhooks only.
53   #
54   # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
55
56   end-success:
57     name: bors dev test finished
58     if: github.event.pusher.name == 'bors' && success()
59     runs-on: ubuntu-latest
60     needs: [clippy_dev]
61
62     steps:
63       - name: Mark the job as successful
64         run: exit 0
65
66   end-failure:
67     name: bors dev test finished
68     if: github.event.pusher.name == 'bors' && (failure() || cancelled())
69     runs-on: ubuntu-latest
70     needs: [clippy_dev]
71
72     steps:
73       - name: Mark the job as a failure
74         run: exit 1