diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11d2a507e0077b148483d8cc132395c7ae8d5b1a..c8c4292f456ce9af10aa6d37c951f0c087beef2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,22 @@ stages: + - test - build - deploy variables: GIT_SUBMODULE_STRATEGY: recursive +test: + stage: test + image: + name: python:3.8-buster + before_script: + - apt-get -y update && apt-get -y install postgresql libpq5 libpq-dev libssl-dev + - pip install poetry + script: + - poetry install + - poetry run tox + build_docker: stage: build image: diff --git a/pyproject.toml b/pyproject.toml index 42c46dad5db844a30656a66796c91bdc4015769a..1c5e554064990ad357395d3d21642ab330817993 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,6 +67,7 @@ django-stubs = "^1.1" pytest = "^5.3" pytest-django = "^3.7" pytest-django-testing-postgresql = "^0.1" +tox = "^3.14" [build-system] requires = ["poetry>=0.12"] diff --git a/tox.ini b/tox.ini index 66f96199f1dfb760c69e20b42c54428c5a1035e0..b2badcf67c7b0139feb5108eef5f7533e61ff528 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,11 @@ [tox] skipsdist = True -envlist = py37 [testenv] whitelist_externals = poetry + pytest skip_install = true +commands = pytest [pylama] linters = pycodestyle,pydocstyle,pyflakes,radon