diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 9c37deef21d..2cfb65ad4b2 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -18,6 +18,7 @@ jobs: - uses: pnpm/action-setup@v4 with: version: ^10.0.0 + - uses: oven-sh/setup-bun@v2 - run: node --version - run: ci/run_conditional_tests.sh name: Run unit tests diff --git a/.github/workflows/windows-presubmit.yaml b/.github/workflows/windows-presubmit.yaml index 624c0f32a7c..8795e6362d3 100644 --- a/.github/workflows/windows-presubmit.yaml +++ b/.github/workflows/windows-presubmit.yaml @@ -11,6 +11,13 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 300 + - name: Update Windows path to use Linux/MacOS compatible binaries from Git Bash + run: echo "C:\Program Files\Git\usr\bin" >> $GITHUB_PATH + shell: bash + - name: Check which cp is being used + run: where cp + run: echo %PATH% + shell: cmd - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v6 with: @@ -18,6 +25,7 @@ jobs: - uses: pnpm/action-setup@v4 with: version: ^10.0.0 + - uses: oven-sh/setup-bun@v2 - run: node --version - run: bash ci/run_conditional_tests.sh name: Run windows unit tests @@ -25,3 +33,6 @@ jobs: env: BUILD_TYPE: presubmit TEST_TYPE: units + SHELL: C:\Program Files\Git\bin\bash.exe + npm_config_script_shell: bash + diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index a7902ed6ca9..3e962d0e476 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -61,11 +61,11 @@ set -e if [[ "${changed}" -eq 0 ]]; then echo "no change detected in ci" else - echo "skipping trigger of tests for now: tracking in #7540" - # echo "change detected in ci, we should test everything" - # echo "result of git diff ${GIT_DIFF_ARG} ci:" - # git diff ${GIT_DIFF_ARG} ci - # GIT_DIFF_ARG="" + #echo "skipping trigger of tests for now: tracking in #7540" + echo "change detected in ci, we should test everything" + echo "result of git diff ${GIT_DIFF_ARG} ci:" + git diff ${GIT_DIFF_ARG} ci + GIT_DIFF_ARG="" fi # Now we have a fixed list, but we can change it to autodetect if diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index 31ce0206111..d1ab68a38f7 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -40,8 +40,13 @@ if [ ${BUILD_TYPE} != "presubmit" ]; then fi # Install dependencies -echo "pnpm install --ignore-scripts --engine-strict --prod; pnpm install" -pnpm install --ignore-scripts --engine-strict --prod; pnpm install +# +# The filter is needed to prevent bun from installing all packages in the repo +# from the root. By default it prefers to analyze, install, and at the root +# so dependencies can be deduplicated. We will try that in a separate PR for +# comparison. +echo "bun install --ignore-scripts --prod --filter .; bun install --filter ." +bun install --ignore-scripts --prod --filter . ; bun install --filter . retval=0 @@ -49,20 +54,20 @@ retval=0 set +e case ${TEST_TYPE} in lint) - pnpm prelint - pnpm lint + npm run prelint + npm run lint retval=$? ;; samples) - pnpm samples-test + npm run samples-test retval=$? ;; system) - pnpm system-test + npm run system-test retval=$? ;; units) - pnpm test + npm run test retval=$? ;; *)