Skip to content

Commit 8ea6b8d

Browse files
Update Code Coverage Report and Fix webapp instructions (#36822)
* Fix webapp config for code coverage tool This PR fixes the cloud deployment config so we can upload code coverage again. * Update readme with extra instructions * Restyled by prettier-markdown * Attempt to fix misspell CI error * Another attempt. Pyspelling CI checker doesn't like Yufeng's name. * Update title to "Matter SDK Coverage Report" and add SHA * Restyled by shfmt --------- Co-authored-by: Restyled.io <[email protected]>
1 parent 728e3e3 commit 8ea6b8d

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

integrations/appengine/README.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Deploy Static Website on App Engine
1+
## Deploy Static Website on App Engine for The Matter SDK Coverage Report
22

33
### Setup google cloud integration
44

@@ -30,7 +30,43 @@ settings of your App Engine application.
3030
Directory `out/coverage/coverage` contains the coverage report files, such as
3131
HTML, CSS, images, and JavaScript.
3232

33+
Deploying your generated report:
34+
3335
```
3436
cd out/coverage/coverage
35-
gcloud app deploy ../../../integrations/appengine/webapp_config.yaml
37+
gcloud app deploy webapp_config.yaml --project matter-build-automation
38+
```
39+
40+
The output should look like:
41+
42+
```
43+
Services to deploy:
44+
45+
descriptor: [/usr/local/google/home/<user>/connectedhomeip/out/coverage/coverage/webapp_config.yaml]
46+
source: [/usr/local/google/home/<user>/connectedhomeip/out/coverage/coverage]
47+
target project: [matter-build-automation]
48+
target service: [default]
49+
target version: [20241212t175429]
50+
target url: [https://matter-build-automation.ue.r.appspot.com]
51+
target service account: [[email protected]]
52+
53+
54+
Do you want to continue (Y/n)? Y
55+
56+
Beginning deployment of service [default]...
57+
╔════════════════════════════════════════════════════════════╗
58+
╠═ Uploading 0 files to Google Cloud Storage ═╣
59+
╚════════════════════════════════════════════════════════════╝
60+
File upload done.
61+
Updating service [default]...done.
62+
Setting traffic split for service [default]...done.
63+
Deployed service [default] to [https://matter-build-automation.ue.r.appspot.com]
64+
65+
You can stream logs from the command line by running:
66+
$ gcloud app logs tail -s default
67+
68+
To view your application in the web browser run:
69+
$ gcloud app browse --project=matter-build-automation
3670
```
71+
72+
If you run into permission issues, reach out to a team member from Google.

integrations/appengine/webapp_config.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
runtime: python27
2-
api_version: 1
3-
threadsafe: true
1+
runtime: python39
42
handlers:
53
- url: /
64
static_files: html/index.html

scripts/build_coverage.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ mkdir -p "$COVERAGE_ROOT"
179179
lcov --initial --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_base.info"
180180
lcov --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_test.info"
181181
lcov --add-tracefile "$COVERAGE_ROOT/lcov_base.info" --add-tracefile "$COVERAGE_ROOT/lcov_test.info" --output-file "$COVERAGE_ROOT/lcov_final.info"
182-
genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html"
182+
genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html" --title "SHA:$(git rev-parse HEAD)" --header-title "Matter SDK Coverage Report"
183183

184184
# Copy webapp's YAML file to the coverage output directory
185185
cp "$CHIP_ROOT/integrations/appengine/webapp_config.yaml" "$COVERAGE_ROOT/webapp_config.yaml"

0 commit comments

Comments
 (0)