This is a practice repo for myself to learn couple key features
- how to break story into small tasks to provide incremental value for business
- how to build docker and setup test environment for continuous integration
- how to provide better introduction and PR standard in GitHub
https://trello.com/b/wBaHaEPa/practices
Build image prior to running this application with either one of the follow commands
docker build
- or
make
Run docker-compose run app
or make run
to execute code from docker
- Install
vs code
- Install formatting tools
pip3 install black isort pre-commit
- Install Git pre-commit hooks with
pre-commit install
** if you having trouble locating pre-commit
after pip3 install, you can either manually add /usr/local/bin/pre-commit
to .bash_profile
or reinstall it with brew install pre-commit
Full commands to run unit and coverage tests
docker-compose run app pytest
Multi unit tests intests
folderdocker-compose run app pytest args=[PATH_TO/FILE_NAME]
Single unit test filedocker-compose run app pytest --cov=. [FOLDER_NAME]/
Coverage tests
You can use the following alias to run unit and coverage tests
make test [args=PATH_TO/FILE_NAME]
section inside[]
is optional. It will run test in a single file ifargs=PATH_TO/FILE_NAME
is given, otherwise, it will run through all tests in code basemake coverage
It will provide you code coverage for entire code base
Life cycle reference: https://docs.travis-ci.com/user/job-lifecycle