Skip to content

Commit 1d15ea4

Browse files
committed
Added docs and reverted all testing data
yet to fix the ambiguity error with main calls
1 parent 90d2a7e commit 1d15ea4

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

.github/workflows/code_coverage.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ on:
88
pull_request:
99
push:
1010
branches:
11-
# Push events on develop branch
11+
Push events on develop branch
1212
- develop
1313

1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

1818
jobs:
19-
# check_unit_tests_completed:
20-
# name: Check unit test completed
21-
# runs-on: ubuntu-latest
22-
# steps:
23-
# - name: Wait for unit tests to checks
24-
# uses: ArcticLampyrid/[email protected]
25-
# with:
26-
# workflow: unit_tests.yml
27-
# sha: auto
19+
check_unit_tests_completed:
20+
name: Check unit test completed
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Wait for unit tests to checks
24+
uses: ArcticLampyrid/[email protected]
25+
with:
26+
workflow: unit_tests.yml
27+
sha: auto
2828

2929
compute_changed_files:
3030
name: Compute changed files
31-
# needs: check_unit_tests_completed
31+
needs: check_unit_tests_completed
3232
runs-on: ubuntu-20.04
3333
outputs:
3434
matrix: ${{ steps.compute-file-matrix.outputs.matrix }}
@@ -247,12 +247,12 @@ jobs:
247247
CHANGED_FILES: ${{ env.CHANGED_FILES }}
248248
run: |
249249
echo "CHANGED FILES: $CHANGED_FILES"
250-
bazel run //scripts:run_coverage -- $(pwd) $CHANGED_FILES --format=proto --processTimeout=15
250+
bazel run //scripts:run_coverage -- $(pwd) $CHANGED_FILES --format=PROTO --processTimeout=15
251251
252252
- name: Upload Coverage Report Artifact
253253
uses: actions/upload-artifact@v4
254254
with:
255-
name: coverage-report-${{ env.SHARD_NAME }}
255+
name: coverage-report-${{ env.SHARD_NAME }} # Saving with unique names to avoid conflict
256256
path: coverage_reports
257257

258258
evaluate-code-coverage-reports:
@@ -341,6 +341,6 @@ jobs:
341341
if: ${{ needs.compute_changed_files.outputs.can_skip_files != 'true' && needs.code_coverage_run.result != 'success' }}
342342
run: exit 1
343343

344-
- name: Coverage Status pased
344+
- name: Coverage status passed
345345
if: ${{ needs.evaluate-code-coverage-reports.result != 'success' }}
346346
run: exit 1

scripts/assets/test_file_exemptions.textproto

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
test_file_exemption {
2-
exempted_file_path: "scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt"
3-
test_file_not_required: true
4-
}
51
test_file_exemption {
62
exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/ActivityComponent.kt"
73
test_file_not_required: true

scripts/src/java/org/oppia/android/scripts/coverage/CoverageReporter.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ const val BOLD = "\u001B[1m"
2525
* Usage:
2626
* bazel run //scripts:coverage_runner -- <path_to_root> <list_of_relative_path_to_proto_files>
2727
*
28+
* Arguments:
29+
* - path_to_root: directory path to the root of the Oppia Android repository.
30+
* - list_of_relative_path_to_proto_files: the list of relative path to the proto files
31+
* with coverage report data to analyse coverage.
32+
*
33+
* Example:
34+
* bazel run //scripts:coverage_reporter -- $(pwd) coverage_reports/utility/src/main/java \\
35+
* /org/oppia/android/util/parser/math/MathModel/coverage_report.pb
2836
*/
2937
fun main(vararg args: String) {
3038
val repoRoot = args[0]

scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit
1919
* Entry point function for running coverage analysis for a source file.
2020
*
2121
* Usage:
22-
* bazel run //scripts:run_coverage_for_test_target -- <path_to_root> <list_of_relative_path_to_files>
22+
* bazel run //scripts:run_coverage -- <path_to_root> <list_of_relative_path_to_files>
2323
*
2424
* Arguments:
2525
* - path_to_root: directory path to the root of the Oppia Android repository.

0 commit comments

Comments
 (0)