-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix (gh actions): Moved away from the black tool to action
- Loading branch information
Andreas
committed
Mar 14, 2022
1 parent
48a9a19
commit fd55eac
Showing
1 changed file
with
0 additions
and
21 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 |
---|---|---|
|
@@ -29,24 +29,3 @@ jobs: | |
run: python3 -m unittest discover -v src | ||
- name: Pylint for unused imports # TODO maybe use pylint for another purpose? | ||
run: pylint --disable=all --enable=unused-argument --enable=global-statement --enable=global-variable-not-assigned --enable=used-before-assignment --enable=function-redefined --enable=abstract-class-instantiated --enable=invalid-unary-operand-type --enable=no-member --enable=undefined-variable --enable=undefined-loop-variable $(git ls-files '*.py') | ||
- name: Black code formatting | ||
run: black --diff --check $(git ls-files '*.py') | ||
- name: If needed, commit black changes to the pull request | ||
if: failure() | ||
run: | | ||
black . | ||
git config --global user.name 'autoblack' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout $GITHUB_HEAD_REF | ||
git commit -am "fixup: Format Python code with Black" | ||
git push | ||
# - uses: snyk/actions/setup@master | ||
# - name: Test dependencies with Snyk | ||
# run: snyk test | ||
# env: | ||
# SNYK_TOKEN: ${{secrets.SNYK_TOKEN}} | ||
# - name: Monitor dependencies for security issues with Snyk | ||
# run: snyk monitor | ||
# env: | ||
# SNYK_TOKEN: ${{secrets.SNYK_TOKEN}} |