12345678910111213141516171819202122232425 |
- on:
- push:
- branches: [ staging, trying ]
- pull_request_target:
- name: Clippy check
- jobs:
- clippy:
- runs-on: ubuntu-latest
- permissions:
- checks: write
- steps:
- - uses: actions/checkout@v2
- if: github.event_name == 'pull_request_target'
- with:
- ref: refs/pull/${{ github.event.number }}/head
- - uses: actions/checkout@v2
- if: github.event_name != 'pull_request_target'
- - run: sed -n 's,^rust-version = "\(.*\)"$,RUSTUP_TOOLCHAIN=\1,p' Cargo.toml >> $GITHUB_ENV
- - run: rustup toolchain install $RUSTUP_TOOLCHAIN
- - run: rustup component add clippy
- - uses: actions-rs/clippy-check@v1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- args: --tests --examples -- -D warnings
|