watchexec/.github/workflows/clippy.yml

63 lines
1.4 KiB
YAML
Raw Normal View History

2022-09-07 02:36:55 +02:00
name: Clippy
2022-05-30 04:34:22 +02:00
on:
2022-09-07 02:36:55 +02:00
workflow_dispatch:
pull_request:
2022-09-07 02:36:55 +02:00
push:
branches:
- main
tags-ignore:
- "*"
2022-09-07 04:15:38 +02:00
env:
CARGO_TERM_COLOR: always
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
2023-01-06 14:53:49 +01:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
2023-01-06 14:53:49 +01:00
clippy:
strategy:
2023-01-06 14:53:49 +01:00
fail-fast: false
matrix:
platform:
- ubuntu
- windows
- macos
2022-09-07 02:36:55 +02:00
name: Clippy on ${{ matrix.platform }}
runs-on: "${{ matrix.platform }}-latest"
steps:
2022-09-07 04:15:38 +02:00
- uses: actions/checkout@v3
- name: Configure toolchain
run: |
2023-01-06 14:53:49 +01:00
rustup toolchain install stable --profile minimal --no-self-update --component clippy
rustup default stable
2022-09-07 05:41:34 +02:00
# https://github.com/actions/cache/issues/752
- if: ${{ runner.os == 'Windows' }}
name: Use GNU tar
shell: cmd
run: |
echo "Adding GNU tar to PATH"
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
2022-09-07 04:15:38 +02:00
- name: Configure caching
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Clippy
2023-01-06 14:53:49 +01:00
run: cargo clippy -- $(cat .clippy-lints | tr -d '\r' | xargs)
shell: bash