improved local test-running ability

call generate-version-file before tests, since they'll fall over if the version file isn't present
use /Users/leohemsted/.virtualenvs/api rather than looking for ./venv/ - if there's some other venv already active, then don't try and look for a current venv to activate
This commit is contained in:
Leo Hemsted
2016-08-23 12:17:53 +01:00
parent 26d7675baa
commit a3843053cd
2 changed files with 2 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ upload-codedeploy-artifact: check-env-vars
aws s3 cp --region eu-west-1 target/notifications-api.zip s3://${DNS_NAME}-codedeploy/notifications-api-${DEPLOY_BUILD_NUMBER}.zip aws s3 cp --region eu-west-1 target/notifications-api.zip s3://${DNS_NAME}-codedeploy/notifications-api-${DEPLOY_BUILD_NUMBER}.zip
.PHONY: test .PHONY: test
test: venv ## Run tests test: venv generate-version-file ## Run tests
./scripts/run_tests.sh ./scripts/run_tests.sh
.PHONY: deploy-api .PHONY: deploy-api

View File

@@ -24,7 +24,7 @@ function display_result {
fi fi
} }
if [ -d venv ]; then if [ -z "$VIRTUAL_ENV" ]; then
source ./venv/bin/activate source ./venv/bin/activate
fi fi
pep8 . pep8 .