Skip to content

Commit 32ee36f

Browse files
gcobena-devararcos
andauthored
feat: TT-399 Config use makefile to executing tests (#350)
* feat: TT-399 Config use makefile to executing tests * feat: TT-399 quit comment on line for pip upgrade * fix: TT-399 inject environment variable for tests Co-authored-by: Alexander <[email protected]>
1 parent 1448fc2 commit 32ee36f

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

V2/Makefile

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
1+
.PHONY: help
2+
help:
3+
@echo "---------------HELP-----------------"
4+
@echo "To install the dependencies type make install"
5+
@echo "To test the project type make test"
6+
@echo "To run the local database type make start-local"
7+
@echo "To run all comands type make ci"
8+
@echo "------------------------------------"
9+
10+
.PHONY: install
111
install:
2-
@echo "Installing Time Tracker"
12+
@echo "=========================================Installing dependencies Time Tracker========================================="
313
npm install
414
pip install --upgrade pip
515
pip install -r requirements.txt
616
@echo "Completed! "
17+
18+
.PHONY: test
19+
test: export ENVIRONMENT = test
20+
test: export TEST_DB_CONNECTION = sqlite:///:memory:
21+
test:
22+
@echo "=========================================Lint with flake8========================================="
23+
flake8 . --show-source --statistics
24+
@echo "Completed flake8!"
25+
@echo "=========================================Test with pytest========================================="
26+
python -m pytest -v
27+
@echo "Completed test!"
28+
729
start-local:
8-
docker compose up
30+
docker compose up
31+
32+
.PHONY: ci
33+
ci: install test

0 commit comments

Comments
 (0)