-
-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add steps to work on push events(master)
- Loading branch information
1 parent
cfa24d7
commit d8d680e
Showing
1 changed file
with
14 additions
and
3 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 |
---|---|---|
|
@@ -37,11 +37,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
if: github.event_name != 'pull_request_target' | ||
if: github.event_name == 'push' | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout PR and master branch | ||
if: github.event_name == 'pull_request_target' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
@@ -65,12 +66,22 @@ jobs: | |
cache-environment: true | ||
cache-downloads: true | ||
|
||
- name: Show statistics | ||
- name: Show statistics pull request | ||
if: github.event_name == 'pull_request_target' | ||
run: ruff check --statistics --show-fixes $(git --no-pager diff --name-only origin/master HEAD --) | tee ruff_stats.txt | ||
|
||
- name: Show entire output | ||
- name: Show entire output pull request | ||
if: github.event_name == 'pull_request_target' | ||
run: ruff check --output-format=concise $(git --no-pager diff --name-only origin/master HEAD --) | tee ruff_full.txt | ||
|
||
- name: Show statistics push | ||
if: github.event_name == 'push' | ||
run: ruff check --statistics --show-fixes . | tee ruff_stats.txt | ||
|
||
- name: Show entire output push | ||
if: github.event_name == 'push' | ||
run: ruff check --output-format=concise . | tee ruff_full.txt | ||
|
||
- name: Statistics output read | ||
id: ruff_stats | ||
uses: juliangruber/[email protected] | ||
|