Skip to content

Commit

Permalink
Added docs and reverted all testing data
Browse files Browse the repository at this point in the history
yet to fix the ambiguity error with main calls
  • Loading branch information
Rd4dev committed Aug 11, 2024
1 parent 90d2a7e commit 1d15ea4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ on:
pull_request:
push:
branches:
# Push events on develop branch
Push events on develop branch
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# check_unit_tests_completed:
# name: Check unit test completed
# runs-on: ubuntu-latest
# steps:
# - name: Wait for unit tests to checks
# uses: ArcticLampyrid/[email protected]
# with:
# workflow: unit_tests.yml
# sha: auto
check_unit_tests_completed:
name: Check unit test completed
runs-on: ubuntu-latest
steps:
- name: Wait for unit tests to checks
uses: ArcticLampyrid/[email protected]
with:
workflow: unit_tests.yml
sha: auto

compute_changed_files:
name: Compute changed files
# needs: check_unit_tests_completed
needs: check_unit_tests_completed
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.compute-file-matrix.outputs.matrix }}
Expand Down Expand Up @@ -247,12 +247,12 @@ jobs:
CHANGED_FILES: ${{ env.CHANGED_FILES }}
run: |
echo "CHANGED FILES: $CHANGED_FILES"
bazel run //scripts:run_coverage -- $(pwd) $CHANGED_FILES --format=proto --processTimeout=15
bazel run //scripts:run_coverage -- $(pwd) $CHANGED_FILES --format=PROTO --processTimeout=15
- name: Upload Coverage Report Artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ env.SHARD_NAME }}
name: coverage-report-${{ env.SHARD_NAME }} # Saving with unique names to avoid conflict
path: coverage_reports

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

- name: Coverage Status pased
- name: Coverage status passed
if: ${{ needs.evaluate-code-coverage-reports.result != 'success' }}
run: exit 1
4 changes: 0 additions & 4 deletions scripts/assets/test_file_exemptions.textproto
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
test_file_exemption {
exempted_file_path: "scripts/src/java/org/oppia/android/scripts/coverage/RunCoverage.kt"
test_file_not_required: true
}
test_file_exemption {
exempted_file_path: "app/src/main/java/org/oppia/android/app/activity/ActivityComponent.kt"
test_file_not_required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ const val BOLD = "\u001B[1m"
* Usage:
* bazel run //scripts:coverage_runner -- <path_to_root> <list_of_relative_path_to_proto_files>
*
* Arguments:
* - path_to_root: directory path to the root of the Oppia Android repository.
* - list_of_relative_path_to_proto_files: the list of relative path to the proto files
* with coverage report data to analyse coverage.
*
* Example:
* bazel run //scripts:coverage_reporter -- $(pwd) coverage_reports/utility/src/main/java \\
* /org/oppia/android/util/parser/math/MathModel/coverage_report.pb
*/
fun main(vararg args: String) {
val repoRoot = args[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit
* Entry point function for running coverage analysis for a source file.
*
* Usage:
* bazel run //scripts:run_coverage_for_test_target -- <path_to_root> <list_of_relative_path_to_files>
* bazel run //scripts:run_coverage -- <path_to_root> <list_of_relative_path_to_files>
*
* Arguments:
* - path_to_root: directory path to the root of the Oppia Android repository.
Expand Down

0 comments on commit 1d15ea4

Please sign in to comment.