-
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.
TST: use pre-commit for flake8 checks (#56)
* TST: use pre-commit for flake8 checks * Fix remove pytest-flake8 * Update setup.cfg
- Loading branch information
Showing
5 changed files
with
85 additions
and
7 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,29 @@ | ||
name: Flake8 | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install pre-commit hooks | ||
run: | | ||
pip install pre-commit | ||
pre-commit install --install-hooks | ||
- name: Code style check via pre-commit | ||
run: | | ||
pre-commit run --all-files |
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,14 @@ | ||
# Configuration of checks run by pre-commit | ||
# | ||
# The tests are executed in the CI pipeline, | ||
# see CONTRIBUTING.rst for further instructions. | ||
# You can also run the checks directly at the terminal, e.g. | ||
# | ||
# $ pre-commit install | ||
# $ pre-commit run --all-files | ||
# | ||
repos: | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '5.0.4' | ||
hooks: | ||
- id: flake8 |
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,7 +1,4 @@ | ||
# To avoid https://github.com/tholo/pytest-flake8/issues/87 | ||
flake8 <5.0.0 | ||
librosa | ||
pytest | ||
pytest-flake8 | ||
pytest-doctestplus | ||
pytest-cov |