2020-12-22 20:11:10 +08:00
|
|
|
on:
|
|
|
|
push:
|
2021-10-21 07:53:56 +08:00
|
|
|
branches: [ staging, trying ]
|
2020-12-22 20:11:10 +08:00
|
|
|
pull_request_target:
|
|
|
|
|
|
|
|
name: Clippy check
|
|
|
|
jobs:
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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'
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-09-10 20:39:46 +08:00
|
|
|
toolchain: 1.53.0
|
2020-12-22 20:11:10 +08:00
|
|
|
override: true
|
|
|
|
components: clippy
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2020-12-30 10:55:35 +08:00
|
|
|
args: --tests --examples -- -D warnings
|