forked from zcash/halo2
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clippy): allow unprivileged runs of clippy
- Loading branch information
Showing
2 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,39 @@ name: Beta lints | |
on: push | ||
|
||
jobs: | ||
clippy-beta: | ||
name: Clippy (beta) | ||
clippy: | ||
name: Clippy | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
components: clippy | ||
override: false | ||
- name: Run Clippy (beta) | ||
uses: actions-rs/clippy-check@v1 | ||
continue-on-error: true | ||
persist-credentials: false | ||
|
||
- name: Check workflow permissions | ||
id: check_permissions | ||
uses: scherermichael-oss/[email protected] | ||
with: | ||
required-permission: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run clippy action to produce annotations | ||
uses: actions-rs/[email protected] | ||
if: ${{ steps.check_permissions.outputs.has-permission }} | ||
with: | ||
name: Clippy (beta) | ||
# GitHub displays the clippy job and its results as separate entries | ||
name: Clippy (stable) Results | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -W clippy::all | ||
args: --all-features --all-targets -- -D warnings | ||
|
||
- uses: actions-rs/[email protected] | ||
if: ${{ !steps.check_permissions.outputs.has-permission }} | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run clippy manually without annotations | ||
if: ${{ !steps.check_permissions.outputs.has-permission }} | ||
run: cargo clippy --all-features --all-targets -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,38 @@ on: pull_request | |
|
||
jobs: | ||
clippy: | ||
name: Clippy (1.56.1) | ||
name: Clippy | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
components: clippy | ||
override: false | ||
- name: Run clippy | ||
uses: actions-rs/clippy-check@v1 | ||
persist-credentials: false | ||
|
||
- name: Check workflow permissions | ||
id: check_permissions | ||
uses: scherermichael-oss/[email protected] | ||
with: | ||
required-permission: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run clippy action to produce annotations | ||
uses: actions-rs/[email protected] | ||
if: ${{ steps.check_permissions.outputs.has-permission }} | ||
with: | ||
name: Clippy (1.56.1) | ||
# GitHub displays the clippy job and its results as separate entries | ||
name: Clippy (stable) Results | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -D warnings | ||
|
||
- uses: actions-rs/[email protected] | ||
if: ${{ !steps.check_permissions.outputs.has-permission }} | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run clippy manually without annotations | ||
if: ${{ !steps.check_permissions.outputs.has-permission }} | ||
run: cargo clippy --all-features --all-targets -- -D warnings |