Skip to content

Commit

Permalink
[FIX] Adapt CI to poetry
Browse files Browse the repository at this point in the history
Remove auto generation of change log (temporary)
Remove install script (all dependencies handled by poetry)
  • Loading branch information
joao-p-marques committed Apr 14, 2021
1 parent 1d29641 commit 241ff2a
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 21 deletions.
30 changes: 16 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,46 @@ cache:

matrix:
include:
- python: 2.7
# Use python 3.8 as system executable for Poetry compatibility
- python: 3.8
env:
TOXENV=pylint
- python: 3.5
PY=2.7
- python: 3.8
env:
TOXENV=pylint
PY=3.5
- python: 3.7
env:
TOXENV=pylint
PY=3.7
DEPLOY="1"
- python: 3.8
env:
TOXENV=pylint
PY=3.8
- python: 3.9-dev
env:
TOXENV=pylint
PY=3.9-dev


install:
# Remove packages installed from addons-apt-packages of travis file
before_install:
- pip install -U pip
- sed -i '/node/d' ${TRAVIS_BUILD_DIR}/install.sh
- sed -i '/pip install ./d' ${TRAVIS_BUILD_DIR}/install.sh

install:
# Install dependencies
- ${TRAVIS_BUILD_DIR}/install.sh

# Install testing dependencies
- pip install coveralls flake8==3.8.3 tox restructuredtext_lint pygments
- pip install poetry tox
# Use correct python version
- poetry env use ${PY}

script:
- flake8 --ignore=E722,F601,F841,W503,W504,W605 --max-line-length=88 --exclude=__init__.py .
- restructuredtext-lint ${TRAVIS_BUILD_DIR}/README.rst
- tox -e $TOXENV,profile-stats
- poetry run flake8 --ignore=E722,F601,F841,W503,W504,W605 --max-line-length=88 --exclude=__init__.py ./pylint_odoo
- poetry run restructuredtext-lint ${TRAVIS_BUILD_DIR}/README.rst

after_success:
- coveralls
- python setup.py sdist # Build ChangeLog file from git log
- poetry run coveralls

deploy:
skip_cleanup: true # Allow to upload Changelog generated from tox
Expand Down
4 changes: 0 additions & 4 deletions install.sh

This file was deleted.

162 changes: 161 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ coveralls = [
{version = "<2.0.0", python = "^2.7"},
{version = "^3.0.1", python = "^3"}
]
flake8 = "3.8.3"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ passenv =
*
commands =
poetry install -v
poetry run python --version
poetry env info
poetry run nodeenv --python-virtualenv
poetry run npm install -g --no-package-lock --no-save eslint
poetry run eslint --version
poetry run coverage run -m unittest
poetry run coverage run -m unittest discover
poetry run coverage report -m

[testenv:profile-stats]
Expand Down

0 comments on commit 241ff2a

Please sign in to comment.