Skip to content

Run the unit tests on the bun engine - #9327

Draft
danieljbruce wants to merge 1 commit into
mainfrom
bun-fix-the-unit-tests
Draft

danieljbruce wants to merge 1 commit into
mainfrom
bun-fix-the-unit-tests

Conversation

@danieljbruce

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request modifies the conditional test execution logic in ci/run_conditional_tests.sh by moving the lint and units test checks above the core package skip condition. The reviewer noted that this change bypasses the optimization designed to skip core packages during non-core triggers, which will lead to redundant test execution and increased CI resource usage. A suggestion was provided to restore the original order to respect the core package boundaries.

Comment on lines +223 to 230
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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant