Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/presubmit-bun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
RUN_TESTS_MODE: RUN_UNIT_TESTS
BUILD_TYPE: presubmit
TEST_TYPE: units
TEST_CMD: bun run
TEST_CMD: bun --bun run
SHARD_TOTAL: ${{ needs.setup.outputs.shard-total }}
SHARD_INDEX: ${{ matrix.shard-index }}
GIT_DIFF_ARG: HEAD^1
Expand Down
5 changes: 4 additions & 1 deletion ci/run_conditional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ for subdir in ${subdirs[@]}; do
echo "run samples tests for core/packages in ${d}"
should_test=true
fi
elif [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then
echo "change detected in ${d} for ${TEST_TYPE} test"
should_test=true
elif [[ "${d}" == core/packages/* ]] || [[ "${d}" == core/dev-packages/* ]]; then
echo "skipping core package ${d} in non-core trigger"
elif [[ "${TEST_TYPE}" == "system" ]] || [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then
elif [[ "${TEST_TYPE}" == "system" ]]; then
echo "change detected in ${d} for ${TEST_TYPE} test"
should_test=true
Comment on lines +223 to 230

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Moving the lint and units test checks above the core package skip condition (core/packages/* and core/dev-packages/*) causes unit and lint tests for core packages to run during non-core triggers. This bypasses the optimization intended to skip core packages in non-core triggers, resulting in redundant test execution and increased CI resource usage.

If the goal is to run unit tests on the bun engine, this should still respect the core package boundaries unless there is a specific reason to run core package unit tests in non-core triggers.

Suggested change
elif [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then
echo "change detected in ${d} for ${TEST_TYPE} test"
should_test=true
elif [[ "${d}" == core/packages/* ]] || [[ "${d}" == core/dev-packages/* ]]; then
echo "skipping core package ${d} in non-core trigger"
elif [[ "${TEST_TYPE}" == "system" ]] || [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then
elif [[ "${TEST_TYPE}" == "system" ]]; then
echo "change detected in ${d} for ${TEST_TYPE} test"
should_test=true
elif [[ "${d}" == core/packages/* ]] || [[ "${d}" == core/dev-packages/* ]]; then
echo "skipping core package ${d} in non-core trigger"
elif [[ "${TEST_TYPE}" == "system" ]] || [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then
echo "change detected in ${d} for ${TEST_TYPE} test"
should_test=true

elif [[ "${tests_with_credentials[*]}" =~ "${d}" ]] && [[ -n "${GOOGLE_APPLICATION_CREDENTIALS}" ]]; then
Expand Down
Loading