2020-12-22 20:11:10 +08:00
|
|
|
on:
|
|
|
|
push:
|
2021-03-26 00:39:28 +08:00
|
|
|
branches: [ staging, trying, master, v0.* ]
|
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-01-05 02:42:26 +08:00
|
|
|
toolchain: 1.49.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
|