Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

CI: generate requirements.txt file to install packages #181

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,36 @@ 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: |
cd repondeur
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
11 changes: 11 additions & 0 deletions repondeur/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tool.black]
exclude = '''
/(
\.mypy_cache
| \.pytest_cache
| \.web_cache
| build
| dist
| src
)/
'''
3 changes: 3 additions & 0 deletions repondeur/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ exclude =
.mypy_cache
.pytest_cache
.web_cache
build
dist
src

[tool:pytest]
addopts = --cov --no-cov-on-fail
Expand Down