Skip to content

Commit 6c9fb21

Browse files
authored
feat(devenv): Make upload command and documentation (#358)
* feat(devenv): All in one upload make command * docs(readme): Document all in one commands and shell code blocks
1 parent f2f535f commit 6c9fb21

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This requires that you've run `gcloud auth login` and `gcloud auth configure-doc
6060

6161
From the repository root:
6262

63-
```
63+
```sh
6464
# Build `umbrella` containers, pull other containers, start docker compose
6565
$ make devenv
6666

@@ -90,7 +90,7 @@ You can view logs with `docker compose logs api` / `docker compose logs worker`
9090

9191
## Running tests locally
9292

93-
```
93+
```sh
9494
# Runs worker tests and emits coverage and test result data in `apps/worker`
9595
$ make devenv.test.worker
9696

@@ -99,6 +99,9 @@ $ make devenv.test.api
9999

100100
# Runs shared tests and emits coverage and test result data in `libs/shared/tests`
101101
$ make devenv.test.shared
102+
103+
# Runs all of the above tests
104+
$ make devenv.test
102105
```
103106

104107
Including the extra parameter "EXTRA_PYTEST_ARGS" allows you to add additional options to the pytest run. For example, if you wanted to run tests in the shared foo directory you could
@@ -119,8 +122,7 @@ github.com:codecov/umbrella=5889cc1e-35b3-41b8-9e02-d441ec80d463
119122

120123
From then on, you can invoke `./tools/devenv/scripts/codecovcli-helper.sh` more-or-less how you'd invoke `codecovcli`:
121124

122-
```
123-
125+
```sh
124126
# Upload worker coverage report with workerunit flag
125127
$ ./tools/devenv/scripts/codecovcli-helper.sh upload-process --report-type coverage -f apps/worker/coverage.xml -F workerunit
126128

@@ -130,10 +132,12 @@ $ ./tools/devenv/scripts/codecovcli-helper.sh upload-process --report-type test_
130132

131133
For convenience, some `make` targets have been created that will upload the coverage and junit files produced by the `make` targest for tests:
132134

133-
```
135+
```sh
134136
$ make devenv.upload.worker
135137
$ make devenv.upload.api
136138
$ make devenv.upload.shared
139+
# Runs all of the above
140+
$ make devenv.upload
137141
```
138142

139143
## Local Gazebo development

tools/devenv/Makefile.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ EXTRA_PYTEST_ARGS ?=
66
.PHONY: devenv.test
77
devenv.test: devenv.test.worker devenv.test.api devenv.test.shared
88

9+
.PHONY: devenv.upload
10+
devenv.upload: devenv.upload.worker devenv.upload.api devenv.upload.shared
11+
912
.PHONY: devenv.test.worker
1013
devenv.test.worker:
1114
docker exec -e COVERAGE_CORE=sysmon -e RUN_ENV=TESTING -e CODECOV_YML=${TEST_YML} -e DJANGO_SETTINGS_MODULE=django_scaffold.settings_test -it umbrella-worker-1 pytest --cov=./ --cov-report=xml:coverage.xml --junitxml=junit.xml -o junit_family=legacy --rootdir=/app -c pytest.ini $(EXTRA_PYTEST_ARGS)

0 commit comments

Comments
 (0)