Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Contains common operations to set up a hermetic Android + Bazel build environment for Oppia
# Android CI workflows. Action prerequisites:
# - JDK 11 must be installed & set as the default version via JAVA_HOME
# - Bazel must be installed, in the path, and be version 6.5.0

# TODO(#1861): Revert SDK pinning for improved CI performance once Bazel is sufficiently stable that
Expand All @@ -11,27 +10,11 @@ description: Sets up the Android & Bazel build environments for Oppia Android
runs:
using: composite
steps:
- name: Check Java version & path
run: |
which java
java -version
echo "Java home: $JAVA_HOME"
$JAVA_HOME/bin/java -version

# Verify that the correct version of Java is installed.
java -version 2>&1 | grep -q -E "11.0"
HAS_CORRECT_JAVA_VERSION=$(echo $?)
if [[ "$HAS_CORRECT_JAVA_VERSION" == 1 ]] ; then
echo "Expected Java 11 to be installed"
exit 1
fi
shell: bash

- name: Verify Bazel version
run: |
bazel --version | grep -q 6.5.0
HAS_CORRECT_BAZEL_VERSION=$(echo $?)
if [[ "$HAS_CORRECT_JAVA_VERSION" == 1 ]] ; then
if [[ "$HAS_CORRECT_BAZEL_VERSION" == 1 ]] ; then
echo "Expected Bazel 6.5.0 to be installed"
exit 1
fi
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
compute_changed_files:
name: Compute changed files
needs: check_unit_tests_completed
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.compute-file-matrix.outputs.matrix }}
can_skip_files: ${{ steps.compute-file-matrix.outputs.can_skip_files }}
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
name: Run Code Coverage
needs: compute_changed_files
if: ${{ needs.compute_changed_files.outputs.can_skip_files != 'true' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 10
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:

evaluate_code_coverage_reports:
name: Evaluate Code Coverage Reports
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [ check_unit_tests_completed, code_coverage_run ]
# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
if: ${{ !cancelled() }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check unit tests passed
if: ${{ needs.check_unit_tests_completed.result != 'success' }}
Expand Down