File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 11# Push test coverage script runnable in bitbucket pipelines
22
33## Setup
4- - add ` TEST_COVERAGE_USERNAME ` , ` TEST_COVERAGE_PASSWORD ` , ` TEST_COVERAGE_URL ` to environment variables
4+ - add ` TEST_COVERAGE_USERNAME ` , ` TEST_COVERAGE_PASSWORD ` , ` TEST_COVERAGE_URL ` to environment variables (BB / local)
55- make sure to use this syntax -> ** VARIABLE=VALUE** <- (not * VARIABLE='VALUE'* )
66
7- ## Implementation
8- - ` export $(cat .env | xargs) && npx GoodRequest/test-coverage-push-script || exit 1 `
7+ ## Local testing
8+ - ** CAUTION: ` export ` may print environment variables to terminal on some systems**
9+ - invoke as ` export $(cat .env | xargs) && npx GoodRequest/test-coverage-push-script `
910- exporting output from .env / xargs makes environment variables accessible to this script
10- - ` ... || exit 1 ` explicitly kills the pipeline if npx script throws in any way
11+
12+ ## Implementation (example bitbucket-pipelines.yml step)
13+ ``` yml
14+ - step :
15+ name : Test code
16+ script :
17+ - npm run db:init:test
18+ - npm run test:coverage
19+ - npx GoodRequest/test-coverage-push-script
20+ services :
21+ - mssql
22+ ` ` `
You can’t perform that action at this time.
0 commit comments