-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b9b229
commit 4ede22a
Showing
3 changed files
with
51 additions
and
6 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,9 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
extend-exclude = | ||
docs/*, | ||
setup.py | ||
extend-ignore = E203 | ||
per-file-ignores = | ||
*/__init__.py:F401,F403 | ||
examples/*,tests/*:E402 |
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 |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
|
@@ -21,6 +19,9 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# requites to grab the history of the PR | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
|
@@ -29,12 +30,13 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/ci_requirements.txt | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint mindpet --rcfile=.github/pylint.conf | ||
- name: Lint with pre-commit | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} | ||
- name: Test with unit test (UT) pytest | ||
run: | | ||
pytest test/unit_test | ||
- name: Test with system test (ST) pytest | ||
run: | | ||
pytest test/developer_test | ||
pytest test/developer_test |
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,34 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
# list of supported hooks: https://pre-commit.com/hooks.html | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.11.5 | ||
hooks: | ||
- id: isort | ||
args: ['--profile', 'black'] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 5.0.4 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pylint-dev/pylint | ||
rev: v2.14.5 | ||
hooks: | ||
- id: pylint | ||
args: [ "-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I" ] | ||
exclude: tests(/\w*)*/functional/|tests/input|tests(/\w*)*data/|doc/ |