Skip to content

Commit 3e142db

Browse files
committed
update-readme
1 parent 6ccd1a5 commit 3e142db

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ build:
66
test-local: build
77
docker run -it -v ${PWD}:/usr/src -w /usr/src \
88
-e LABELBOX_TEST_ENVIRON="local" \
9-
-e LABELBOX_TEST_API_KEY_STAGING=${LABELBOX_TEST_API_KEY_LOCAL} \
9+
-e LABELBOX_TEST_API_KEY_LOCAL=${LABELBOX_TEST_API_KEY} \
1010
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
1111

1212
test-staging: build
1313
docker run -it -v ${PWD}:/usr/src -w /usr/src \
1414
-e LABELBOX_TEST_ENVIRON="staging" \
15-
-e LABELBOX_TEST_API_KEY_STAGING=${LABELBOX_TEST_API_KEY_STAGING} \
15+
-e LABELBOX_TEST_API_KEY_STAGING=${LABELBOX_TEST_API_KEY} \
1616
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
1717

1818
test-prod: build
1919
docker run -it -v ${PWD}:/usr/src -w /usr/src \
2020
-e LABELBOX_TEST_ENVIRON="prod" \
21-
-e LABELBOX_TEST_API_KEY_PROD=${LABELBOX_TEST_API_KEY_PROD} \
21+
-e LABELBOX_TEST_API_KEY_PROD=${LABELBOX_TEST_API_KEY} \
2222
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,23 @@ client = Client(api_key="your_key_here", endpoint="http://localhost:8080/_gql")
6767
Please consult `CONTRIB.md`
6868

6969
## Testing
70-
1. Update the `Makefile` with your `staging` or `prod` API key. Ensure that docker has been installed on your system. Make sure the key is not from a free tier account.
70+
1. Update the `Makefile` with your `local`, `staging`, `prod` API key. Ensure that docker has been installed on your system. Make sure the key is not from a free tier account.
7171
2. To test on `staging`:
7272
```
73-
make test-staging
73+
make test-staging PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
7474
```
7575

7676
3. To test on `prod`:
7777
```
78-
make test-prod
78+
make test-prod PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
7979
```
8080

8181
4. If you make any changes and need to rebuild the image used for testing, force a rebuild with the `-B` flag
8282
```
8383
make -B {build|test-staging|test_prod}
8484
```
85+
86+
Or you can just run everything in a single command:
87+
```
88+
docker build -t local/labelbox-python:test . && make test-staging PATH_TO_TEST= LABELBOX_TEST_API_KEY=
89+
```

0 commit comments

Comments
 (0)