5 # Ignore bors branches, since they are covered by `clippy_bors.yml`
9 # Don't run Clippy tests, when only textfiles were modified
16 # Don't run Clippy tests, when only textfiles were modified
25 CARGO_TARGET_DIR: '${{ github.workspace }}/target'
30 # NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
31 runs-on: ubuntu-latest
35 - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
37 github_token: "${{ secrets.github_token }}"
40 uses: actions/checkout@v2.3.3
42 - name: Install toolchain
43 run: rustup show active-toolchain
46 - name: Set LD_LIBRARY_PATH (Linux)
48 SYSROOT=$(rustc --print sysroot)
49 echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
52 run: cargo build --features deny-warnings,internal-lints
55 run: cargo test --features deny-warnings,internal-lints
57 - name: Test clippy_lints
58 run: cargo test --features deny-warnings,internal-lints
59 working-directory: clippy_lints
61 - name: Test rustc_tools_util
62 run: cargo test --features deny-warnings
63 working-directory: rustc_tools_util
65 - name: Test clippy_dev
66 run: cargo test --features deny-warnings
67 working-directory: clippy_dev
69 - name: Test cargo-clippy
70 run: ../target/debug/cargo-clippy
71 working-directory: clippy_workspace_tests
73 - name: Test cargo-clippy --fix
74 run: ../target/debug/cargo-clippy clippy --fix -Zunstable-options
75 working-directory: clippy_workspace_tests
77 - name: Test clippy-driver
78 run: bash .github/driver.sh
82 - name: Test cargo dev new lint
84 cargo dev new_lint --name new_early_pass --pass early
85 cargo dev new_lint --name new_late_pass --pass late