Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-k0 committed Oct 25, 2024
1 parent 20f3ed8 commit 114028e
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows-source/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,27 @@ jobs:
shell: bash
run: |
set -xeuo pipefail
# Determine which tests to skip and append 'long_test' for pull requests or merge groups
EXCLUDED_TEST_TAGS=(system_test_hourly system_test_nightly system_test_nightly_nns system_test_staging system_test_hotfix system_test_benchmark fuzz_test fi_tests_nightly nns_tests_nightly)
if [[ "${{ github.event_name }}" =~ ^(pull_request|merge_group)$ ]] && [[ "${RUN_ON_DIFF_ONLY:-}" == "true" ]]; then
EXCLUDED_TEST_TAGS+=(long_test)
EXCLUDED_TEST_TAGS=(
system_test_hourly
system_test_nightly
system_test_nightly_nns
system_test_staging
system_test_hotfix
system_test_benchmark
fuzz_test
fi_tests_nightly
nns_tests_nightly
)
if [[ "${{ github.event_name }}" =~ ^(pull_request|merge_group)$ ]]; then
if [[ "${GITHUB_EVENT_NAME}" == "merge_group" || "${RUN_ON_DIFF_ONLY:-}" == "true" ]]; then
EXCLUDED_TEST_TAGS+=(long_test)
fi
fi
# Export excluded tags as environment variable for ci/bazel-scripts/diff.sh
echo "EXCLUDED_TEST_TAGS=${EXCLUDED_TEST_TAGS[*]}" >> $GITHUB_ENV
# Prepend tags with '-' and join them with commas for Bazel
TEST_TAG_FILTERS=$(IFS=,; echo "${EXCLUDED_TEST_TAGS[*]/#/-}")
# Determine BAZEL_EXTRA_ARGS based on event type or branch name
BAZEL_EXTRA_ARGS="--test_tag_filters=$TEST_TAG_FILTERS"
if [[ "${{ github.event_name }}" == 'merge_group' ]]; then
Expand All @@ -134,7 +142,6 @@ jobs:
else
BAZEL_EXTRA_ARGS+=" --keep_going"
fi
# Export BAZEL_EXTRA_ARGS to environment
echo "BAZEL_EXTRA_ARGS=$BAZEL_EXTRA_ARGS" >> $GITHUB_ENV
- name: Run Bazel Test All
Expand Down

0 comments on commit 114028e

Please sign in to comment.