]> git.lizzy.rs Git - rust.git/blob - .github/workflows/clippy.yml
Auto merge of #8947 - Serial-ATA:lint-produces-output, r=xFrednet
[rust.git] / .github / workflows / clippy.yml
1 name: Clippy Test
2
3 on:
4   push:
5     # Ignore bors branches, since they are covered by `clippy_bors.yml`
6     branches-ignore:
7       - auto
8       - try
9     # Don't run Clippy tests, when only text files were modified
10     paths-ignore:
11     - 'COPYRIGHT'
12     - 'LICENSE-*'
13     - '**.md'
14     - '**.txt'
15   pull_request:
16     # Don't run Clippy tests, when only text files were modified
17     paths-ignore:
18     - 'COPYRIGHT'
19     - 'LICENSE-*'
20     - '**.md'
21     - '**.txt'
22
23 env:
24   RUST_BACKTRACE: 1
25   CARGO_TARGET_DIR: '${{ github.workspace }}/target'
26   NO_FMT_TEST: 1
27
28 jobs:
29   base:
30     # NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
31     runs-on: ubuntu-latest
32
33     steps:
34     # Setup
35     - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
36       with:
37         github_token: "${{ secrets.github_token }}"
38
39     - name: Checkout
40       uses: actions/checkout@v3.0.2
41
42     - name: Install toolchain
43       run: rustup show active-toolchain
44
45     # Run
46     - name: Set LD_LIBRARY_PATH (Linux)
47       run: |
48         SYSROOT=$(rustc --print sysroot)
49         echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
50
51     - name: Build
52       run: cargo build --features deny-warnings,internal
53
54     - name: Test
55       run: cargo test --features deny-warnings,internal
56
57     - name: Test clippy_lints
58       run: cargo test --features deny-warnings,internal
59       working-directory: clippy_lints
60
61     - name: Test clippy_utils
62       run: cargo test --features deny-warnings,internal
63       working-directory: clippy_utils
64
65     - name: Test rustc_tools_util
66       run: cargo test --features deny-warnings
67       working-directory: rustc_tools_util
68
69     - name: Test clippy_dev
70       run: cargo test --features deny-warnings
71       working-directory: clippy_dev
72
73     - name: Test clippy-driver
74       run: bash .github/driver.sh
75       env:
76         OS: ${{ runner.os }}