diff --git a/.github/workflows/ci-rbe.yml b/.github/workflows/ci-rbe.yml index 02cf3522df8f6..a63b54210d7b9 100644 --- a/.github/workflows/ci-rbe.yml +++ b/.github/workflows/ci-rbe.yml @@ -6,6 +6,12 @@ on: branches: - trunk workflow_dispatch: + inputs: + disable_test_cache: + description: 'Force re-run of tests (disable test cache)' + required: false + default: false + type: boolean jobs: format: @@ -26,4 +32,4 @@ jobs: name: All RBE tests caching: false ruby-version: jruby-9.4.12.0 - run: ./scripts/github-actions/ci-build.sh + run: ./scripts/github-actions/ci-build.sh ${{ github.event.inputs.disable_test_cache }} diff --git a/scripts/github-actions/ci-build.sh b/scripts/github-actions/ci-build.sh index 37b54e9e8c8f6..89088464376c6 100755 --- a/scripts/github-actions/ci-build.sh +++ b/scripts/github-actions/ci-build.sh @@ -4,11 +4,20 @@ set -eufo pipefail # We want to see what's going on set -x +# Default to auto if no parameter is provided +CACHE_RESULTS="auto" + +# If "disable test cache" is passed in and true +if [ $# -gt 0 ] && [ "$1" = "true" ]; then + CACHE_RESULTS="no" +fi + # Now run the tests. The engflow build uses pinned browsers # so this should be fine # shellcheck disable=SC2046 bazel test --config=rbe-ci --build_tests_only \ --keep_going --flaky_test_attempts=2 \ + --cache_test_results=${CACHE_RESULTS} \ //... -- $(cat .skipped-tests | tr '\n' ' ') # Build the packages we want to ship to users