diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f5016839..bb5a7edff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,26 +18,29 @@ jobs: name: Install system deps command: sudo apt-get install -y wkhtmltopdf xvfb - run: - name: Install Python deps in a venv + name: Install Python deps command: | sudo pip install pipenv==2018.7.1 cd repondeur - pipenv install --dev + pipenv lock -r >requirements.txt + sudo pip install -r requirements.txt + pipenv lock -r --dev >requirements-dev.txt + sudo pip install -r requirements-dev.txt - run: name: Check formatting with black command: | cd repondeur - pipenv run black --check . + black --check . - run: name: Check coding style with flake8 command: | cd repondeur - pipenv run flake8 + flake8 - run: name: Check type annotations with mypy command: | cd repondeur - pipenv run mypy zam_repondeur + mypy zam_repondeur - run: name: Run tests command: | @@ -45,6 +48,6 @@ jobs: sudo sed --in-place '/fr_FR.UTF-8/s/^#//' /etc/locale.gen sudo locale-gen fr_FR.UTF-8 mkdir -p test-reports - pipenv run pytest -vv --junitxml=test-reports/junit.xml + pytest -vv --junitxml=test-reports/junit.xml tests/ - store_test_results: path: repondeur/test-reports diff --git a/repondeur/pyproject.toml b/repondeur/pyproject.toml new file mode 100644 index 000000000..1e7069bb2 --- /dev/null +++ b/repondeur/pyproject.toml @@ -0,0 +1,11 @@ +[tool.black] +exclude = ''' +/( + \.mypy_cache + | \.pytest_cache + | \.web_cache + | build + | dist + | src +)/ +''' \ No newline at end of file diff --git a/repondeur/setup.cfg b/repondeur/setup.cfg index db2dac12e..2b7eca1d1 100644 --- a/repondeur/setup.cfg +++ b/repondeur/setup.cfg @@ -4,6 +4,9 @@ exclude = .mypy_cache .pytest_cache .web_cache + build + dist + src [tool:pytest] addopts = --cov --no-cov-on-fail