Skip to content

Commit

Permalink
Re running, also un commenting the oppia build tests caching - probab…
Browse files Browse the repository at this point in the history
…ly its not gonna do anything as its only with caching
  • Loading branch information
Rd4dev committed Jul 21, 2024
1 parent 968474b commit 22f201d
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,30 +242,30 @@ jobs:
cd $GITHUB_WORKSPACE
git secret reveal
# # See https://www.cyberciti.biz/faq/unix-for-loop-1-to-10/ for for-loop reference.
# - name: Build Oppia Tests (with caching, non-fork only)
# if: ${{ env.ENABLE_CACHING == 'true' && ((github.ref == 'refs/heads/develop' && github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == 'oppia/oppia-android')) }}
# env:
# BAZEL_REMOTE_CACHE_URL: ${{ secrets.BAZEL_REMOTE_CACHE_URL }}
# BAZEL_TEST_TARGETS: ${{ env.BAZEL_TEST_TARGETS }}
# run: |
# # Attempt to build 5 times in case there are flaky builds.
# # TODO(#3759): Remove this once there are no longer app test build failures.
# i=0
# # Disable exit-on-first-failure.
# set +e
# while [ $i -ne 5 ]; do
# i=$(( $i+1 ))
# echo "Attempt $i/5 to build test targets"
# bazel build --keep_going --remote_http_cache=$BAZEL_REMOTE_CACHE_URL --google_credentials=./config/oppia-dev-workflow-remote-cache-credentials.json -- $BAZEL_TEST_TARGETS
# done
# # Capture the error code of the final command run (which should be a success if there isn't a real build failure).
# last_error_code=$?
# # Reenable exit-on-first-failure.
# set -e
# # Exit only if the most recent exit was a failure (by using a subshell).
# (exit $last_error_code)
#
# See https://www.cyberciti.biz/faq/unix-for-loop-1-to-10/ for for-loop reference.
- name: Build Oppia Tests (with caching, non-fork only)
if: ${{ env.ENABLE_CACHING == 'true' && ((github.ref == 'refs/heads/develop' && github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == 'oppia/oppia-android')) }}
env:
BAZEL_REMOTE_CACHE_URL: ${{ secrets.BAZEL_REMOTE_CACHE_URL }}
BAZEL_TEST_TARGETS: ${{ env.BAZEL_TEST_TARGETS }}
run: |
# Attempt to build 5 times in case there are flaky builds.
# TODO(#3759): Remove this once there are no longer app test build failures.
i=0
# Disable exit-on-first-failure.
set +e
while [ $i -ne 5 ]; do
i=$(( $i+1 ))
echo "Attempt $i/5 to build test targets"
bazel build --keep_going --remote_http_cache=$BAZEL_REMOTE_CACHE_URL --google_credentials=./config/oppia-dev-workflow-remote-cache-credentials.json -- $BAZEL_TEST_TARGETS
done
# Capture the error code of the final command run (which should be a success if there isn't a real build failure).
last_error_code=$?
# Reenable exit-on-first-failure.
set -e
# Exit only if the most recent exit was a failure (by using a subshell).
(exit $last_error_code)
# - name: Build Oppia Tests (without caching, or on a fork)
# if: ${{ env.ENABLE_CACHING == 'false' || ((github.ref != 'refs/heads/develop' || github.event_name != 'push') && (github.event.pull_request.head.repo.full_name != 'oppia/oppia-android')) }}
# env:
Expand Down

0 comments on commit 22f201d

Please sign in to comment.