Skip to content

Commit

Permalink
Better code check (#2923)
Browse files Browse the repository at this point in the history
* Collect code check result

* Fix path

* Ignore error

* Comment PR

* Don't print color

* Fix command
  • Loading branch information
seabornlee authored Nov 8, 2022
1 parent 150407f commit 730c025
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ jobs:
- name: Check all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
npx ec "$file"
npx ec -no-color "$file" >> format-error.txt || true
done
if [[ -s "format-error.txt" ]]; then
exit 1
else
exit 0
fi
- name: Collect results
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: format-error
path: format-error.txt
- name: comment PR
if: ${{ failure() }}
uses: machine-learning-apps/pr-comment@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: format-error.txt

0 comments on commit 730c025

Please sign in to comment.