forked from laynep/LearnAsYouGoEmulator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github): Run pre-commit in github actions (#2)
- Configure github actions to run pre-commit on the repo to check style, etc. - Update to stable/new versions of hooks to avoid spurious failures from upstream updates. - Flag a few imports in tests and examples with NOQA. This is to avoid bugs in isort. In particular, isort is environment dependent. PyCQA/isort#1147 PyCQA/isort#952 PyCQA/isort#1007 - Disable one flake8 lint: 501, line too long
- Loading branch information
Showing
8 changed files
with
43 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# https://github.com/pre-commit/action | ||
# Run all pre-commit lints | ||
|
||
name: pre-commit | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v1 | ||
- name: set PY | ||
run: echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' -f1)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
- uses: pre-commit/[email protected] |
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
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
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
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
[tool:pytest] | ||
python_files = test_*.py *_test.py testing/*/*.py example_*.py | ||
python_functions = test_* example_* | ||
|
||
[flake8] | ||
ignore = | ||
# line too long | ||
E501, | ||
|
||
[tool:isort] | ||
known_first_party=learn_as_you_go |
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
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
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