Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12d2bc2

Browse files
committed
get tests working in docker container
1 parentc843a10 commit12d2bc2

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

‎.travis.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ dist: xenial
22
language:python
33
python:3.8
44

5-
install:
6-
-pip3 install -r requirements.txt
7-
85
script:
96
-make all
107

‎Makefile‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,22 @@ up:
1111
docker-compose up -d app
1212

1313
down:
14-
docker-compose down
14+
docker-compose down --remove-orphans
15+
16+
test: up
17+
docker-compose run --rm --no-deps --entrypoint=pytest app /tests/unit /tests/integration /tests/e2e
18+
19+
unit-tests:
20+
docker-compose run --rm --no-deps --entrypoint=pytest app /tests/unit
21+
22+
integration-tests: up
23+
docker-compose run --rm --no-deps --entrypoint=pytest app /tests/integration
24+
25+
e2e-tests: up
26+
docker-compose run --rm --no-deps --entrypoint=pytest app /tests/e2e
1527

1628
logs:
1729
docker-compose logs app| tail -100
1830

19-
test:
20-
pytest --tb=short
21-
2231
black:
2332
black -l 86$$(find * -name '*.py')

‎docker-compose.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ services:
1010
environment:
1111
-DB_HOST=postgres
1212
-DB_PASSWORD=abc123
13+
-API_HOST=app
14+
-PYTHONDONTWRITEBYTECODE=1
1315
volumes:
1416
-./src:/src
17+
-./tests:/tests
1518
ports:
1619
-"5005:80"
1720

‎tests/__init__.py‎

Whitespace-only changes.

‎tests/mypy.ini‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎tests/pytest.ini‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
addopts = --tb=short

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp