docker-compose build
cp config.yml.example config.yml
cp .env.example .env
python -m pytest tests/test_registration.py
python -m pytest tests/
python -m pytest -s tests/test_contact_report.py
To generate xml results, run the following command : pytest Tests --junitxml="result.xml"
For more on Pytest, go here.
Windows
Remove-Item -Recurse -Force .pytest_cache
Prerequisites:
-
You need to create a KMS key in AWS.
-
Update aws setting in
pytest.ini
-
You can create
config.yml.dev
,config.yml.staging
andconfig.yml.production
. And then doing encryption before running CI/CD pipeline. -
Do encryption
$ export KMS_KEY_ID="your_kms_key_id"
$ docker-compose run app python tools/scripts/encrypt_config.py [Environment]
Environment will be:
dev
: for feature branchstaging
for master branchproduction
for tag
It will create a S3 file object under pytest/encrypted_config.yml
of S3 bucket.
Production uses starter
bucket. Staging uses starter-staging
bucket.
git checkout YOUR_BRANCH
git add .
git commit -m "YOUR_MESSAGE"
git push origin YOUR_BRANCH