Skip to content

Commit 1e02a08

Browse files
authored
Update README.md
1 parent 2dab6c3 commit 1e02a08

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
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+
```

0 commit comments

Comments
 (0)