Skip to content

Commit

Permalink
Split linters and pytest in Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bansan85 committed Jan 2, 2021
1 parent ce92a2f commit 35c425a
Show file tree
Hide file tree
Showing 5 changed files with 231 additions and 126 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: linters

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY_TRAVIS_CI }}
# get with ssh-keyscan localhost
known_hosts: localhost ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCUWdBcM5OvIS/hYfBQkC6nKSuyoPfuYrc90aiTYZvNkKIVKDcTWHmgPJMllbP4GD8b5lBF1NPGde2iKO0d0K/7IIAI0/nAKYgKcu0b1JuF9m4lj7x8YWSGFSXg+EmU3IUBLr777jbok9mCLy1UO6I6Dmu/nNwy+Q8GCAbqtQodUF1fpavJeTIBnVBcGOkesUC/X1HIboCiBQl1etUj8Xip3eb41TVz7Eda2DUSEsot4g4SkYd6fnCve4c2hO2vGzeeMsdWOWaM/FZCBy6FBCYC15ta8dcAOBzkqM9/kPDxuR53qzjHoZhwLu4XWybd5J+4gmKlPkwQDSUwvCsVx5ax
- name: Set up Python "3.9"
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install binaries dependencies
run: sudo apt-get install tesseract-ocr tesseract-ocr-fra tesseract-ocr-eng
- name: Install python modules dependencies
run: |
python -m pip install --upgrade pip pipdeptree
pip install -r requirements.txt
pip install -r linter-requirements.txt
pipdeptree -f > linter-requirements-ci.txt
diff -pu linter-requirements.txt linter-requirements-ci.txt
- name: Lint
run: |
pylint {**,.}/*.py
flake8 {**,.}/*.py
prospector {**,.}/*.py
pycodestyle {**,.}/*.py
mypy {**,.}/*.py
safety check -r requirements.txt
safety check -r linter-requirements.txt
safety check
9 changes: 0 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ jobs:
pip install -r test-requirements.txt
pipdeptree -f > test-requirements-ci.txt
diff -pu test-requirements.txt test-requirements-ci.txt || { [[ "${{ matrix.python-version }}" != "3.7" ]] && exit 1 || exit 0; }
- name: Lint
run: |
pylint {**,.}/*.py
flake8 {**,.}/*.py
prospector {**,.}/*.py
pycodestyle {**,.}/*.py
mypy {**,.}/*.py
safety check -r requirements.txt
safety check -r test-requirements.txt
safety check
Expand All @@ -67,12 +60,10 @@ jobs:
git config --global user.name "Travis"
git config --global user.email "travis-ci@le-garrec.fr"
git add .
touch COMMIT_MSG
cat << EOF > COMMIT_MSG
${{ github.event.head_commit.message }}
EOF
if [ -n "$(git diff-index --name-only HEAD --)" ]
then
echo -e "\n" >> COMMIT_MSG
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"python.formatting.provider": "black"
"python.formatting.provider": "black",
"python.linting.pylintEnabled": true
}
180 changes: 180 additions & 0 deletions linter-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
flake8-bugbear==20.11.1
attrs==20.3.0
flake8==3.8.4
mccabe==0.6.1
pycodestyle==2.6.0
pyflakes==2.2.0
flake8-import-order==0.18.1
pycodestyle==2.6.0
setuptools==51.1.0
mypy==0.790
mypy-extensions==0.4.3
typed-ast==1.4.1
typing-extensions==3.7.4.3
opencv-python==4.4.0.46
numpy==1.20.0rc2
pipdeptree==2.0.0
pip==20.3.3
prospector==1.3.1
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
dodgy==0.2.1
mccabe==0.6.1
pep8-naming==0.10.0
flake8-polyfill==1.0.2
flake8==3.8.4
mccabe==0.6.1
pycodestyle==2.6.0
pyflakes==2.2.0
pycodestyle==2.6.0
pydocstyle==5.1.1
snowballstemmer==2.0.0
pyflakes==2.2.0
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-celery==0.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-django==2.1.0
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-flask==0.6
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
PyYAML==5.3.1
requirements-detector==0.7
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
setoptconf==0.2.0
pytesseract==0.3.7
Pillow==8.0.1
pytest-cov==2.10.1
coverage==5.3.1
pytest==6.2.1
attrs==20.3.0
iniconfig==1.1.1
packaging==20.8
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
pytest-timeout==1.4.2
pytest==6.2.1
attrs==20.3.0
iniconfig==1.1.1
packaging==20.8
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
pytest-xdist==2.2.0
execnet==1.7.1
apipkg==1.5
pytest==6.2.1
attrs==20.3.0
iniconfig==1.1.1
packaging==20.8
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
pytest-forked==1.3.0
py==1.10.0
pytest==6.2.1
attrs==20.3.0
iniconfig==1.1.1
packaging==20.8
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
safety==1.10.0
click==7.1.2
dparse==0.5.1
packaging==20.8
pyparsing==2.4.7
PyYAML==5.3.1
toml==0.10.2
packaging==20.8
pyparsing==2.4.7
requests==2.25.1
certifi==2020.12.5
chardet==4.0.0
idna==2.10
urllib3==1.26.2
setuptools==51.1.0
scipy==1.5.4
numpy==1.20.0rc2
wheel==0.36.2
116 changes: 0 additions & 116 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,123 +1,7 @@
flake8-bugbear==20.11.1
attrs==20.3.0
flake8==3.8.4
mccabe==0.6.1
pycodestyle==2.6.0
pyflakes==2.2.0
flake8-import-order==0.18.1
pycodestyle==2.6.0
setuptools==51.1.0
mypy==0.790
mypy-extensions==0.4.3
typed-ast==1.4.1
typing-extensions==3.7.4.3
opencv-python==4.4.0.46
numpy==1.20.0rc2
pipdeptree==2.0.0
pip==20.3.3
prospector==1.3.1
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
dodgy==0.2.1
mccabe==0.6.1
pep8-naming==0.10.0
flake8-polyfill==1.0.2
flake8==3.8.4
mccabe==0.6.1
pycodestyle==2.6.0
pyflakes==2.2.0
pycodestyle==2.6.0
pydocstyle==5.1.1
snowballstemmer==2.0.0
pyflakes==2.2.0
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-celery==0.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-django==2.1.0
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-flask==0.6
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
isort==4.3.21
mccabe==0.6.1
toml==0.10.2
PyYAML==5.3.1
requirements-detector==0.7
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.15.0
wrapt==1.12.1
setoptconf==0.2.0
pytesseract==0.3.7
Pillow==8.0.1
pytest-cov==2.10.1
Expand Down

0 comments on commit 35c425a

Please sign in to comment.