Skip to content

Commit

Permalink
Updating Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdrans committed Mar 25, 2020
1 parent 8e2611e commit 8b08120
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM python:3.8

COPY . /app
WORKDIR /app

RUN pip install -U pytest
COPY requirements.txt /app
RUN pip install -r requirements.txt

COPY . /app

CMD ["python", "/app/src/app.py"]
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@

default: test

test:
PYTHONPATH=/app/tests pytest
build:
docker build -t python-build-cli-planner-app .

test: build
docker run -t python-build-cli-planner-app pytest /app/tests/tests.py

start: build
docker run -it python-build-cli-planner-app
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.4.1
5 changes: 5 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import unittest

class TestOne(unittest.TestCase):
def test_one(self):
assert 1+1 == 2

0 comments on commit 8b08120

Please sign in to comment.