- python3.7
- virtualenv
- pipenv
- Clone repository from GitLab and navigate to repository root
- Run
pipenv sync --dev
to install dependencies. This will create a new virtual environment on first run
- Shell:
pipenv shell
will spawn a new shell with the virtual environment imported - Setup IDE: get virtual environment path from
pipenv --venv
and setup IDE using this path
- Add to
./test/unit/
and mirror directory structure from./bb-py
- Unit tests should not make external calls to 3rd parties such as AWS; those belong in functional tests
- Test classes use built-in unittest module. Test methods should start with
test_
- Tests are run with nose. Test files should start with
test_
- To run unit tests:
pipenv run nosetests
from./test/unit
- Add to
./test/functional/
and mirror directory structure from./bb-py
- Tokens for 3rd party APIs should not be committed; they should be added as GitLab CI/CD Secrets
- CI uses the AWS bb-py-ci IAM user. Only the policies required by functional tests should be granted to that user.
- Test classes use built-in unittest module. Test methods should start with
test_
- Tests are run with nose. Test files should start with
test_
- To run unit tests:
pipenv run nosetests
from./test/functional
Non-python files used for testing belong in ./test/resources
Test-related python code belongs in ./test/testutils
Build-related files and scripts belong in ./scripts
- GitLab CI runs unit tests on each commit and pull request
- The GitLab CI tests are defined in
./.gitlab-ci.yml
- CI related scripts are located in
./scripts/ci