From 88d9c81b9189ced13c9d43f696fb1cc9b86ee139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Cobe=C3=B1a?= Date: Tue, 16 Nov 2021 17:54:35 -0500 Subject: [PATCH 1/3] feat: TT-399 Config use makefile to executing tests --- V2/Makefile | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/V2/Makefile b/V2/Makefile index 45080238..7022d121 100644 --- a/V2/Makefile +++ b/V2/Makefile @@ -1,8 +1,31 @@ +.PHONY: help +help: + @echo "---------------HELP-----------------" + @echo "To install the dependencies type make install" + @echo "To test the project type make test" + @echo "To run the local database type make start-local" + @echo "To run all comands type make ci" + @echo "------------------------------------" + +.PHONY: install install: - @echo "Installing Time Tracker" + @echo "=========================================Installing dependencies Time Tracker=========================================" npm install - pip install --upgrade pip + # pip install --upgrade pip pip install -r requirements.txt @echo "Completed! " + +.PHONY: test +test: + @echo "=========================================Lint with flake8=========================================" + flake8 . --show-source --statistics + @echo "Completed flake8!" + @echo "=========================================Test with pytest=========================================" + python -m pytest -v + @echo "Completed test!" + start-local: - docker compose up \ No newline at end of file + docker compose up + +.PHONY: ci +ci: install test \ No newline at end of file From 260464a876fea665de8dbfc99124338cf8b83c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Cobe=C3=B1a?= Date: Wed, 17 Nov 2021 10:05:13 -0500 Subject: [PATCH 2/3] feat: TT-399 quit comment on line for pip upgrade --- V2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/V2/Makefile b/V2/Makefile index 7022d121..409f8fc5 100644 --- a/V2/Makefile +++ b/V2/Makefile @@ -11,7 +11,7 @@ help: install: @echo "=========================================Installing dependencies Time Tracker=========================================" npm install - # pip install --upgrade pip + pip install --upgrade pip pip install -r requirements.txt @echo "Completed! " From 42f7378073e12d5bf6c4c5f3758ed8754567b3a1 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 17 Nov 2021 17:24:08 -0500 Subject: [PATCH 3/3] fix: TT-399 inject environment variable for tests --- V2/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/V2/Makefile b/V2/Makefile index 409f8fc5..135e96d0 100644 --- a/V2/Makefile +++ b/V2/Makefile @@ -16,6 +16,8 @@ install: @echo "Completed! " .PHONY: test +test: export ENVIRONMENT = test +test: export TEST_DB_CONNECTION = sqlite:///:memory: test: @echo "=========================================Lint with flake8=========================================" flake8 . --show-source --statistics