Skip to content
Open
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
34 changes: 34 additions & 0 deletions .github/workflows/presubmit-bun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
permissions:
contents: read

on:
pull_request:
name: presubmit-bun
jobs:
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
fetch-depth: 300
persist-credentials: false
# Node.js is required by pnpm for installing dependencies.
- name: Use Node.js 24
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
# We continue to use PNPM (rather than Bun) for installation for consistent
# lockfile/version management between CI/runtimes.
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: ^10.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
- run: bun --version
- run: ci/run_conditional_tests.sh
name: Run unit tests with Bun
env:
BUILD_TYPE: presubmit
TEST_TYPE: units
TEST_CMD: bun run
9 changes: 4 additions & 5 deletions ci/run_conditional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ 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 "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
Expand Down
12 changes: 7 additions & 5 deletions ci/run_single_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if [ -z "${TEST_TYPE}" ]; then
TEST_TYPE="units"
fi

TEST_CMD=${TEST_CMD:-pnpm}

d=$(pwd)
PROJECT=$(basename ${d})

Expand Down Expand Up @@ -76,20 +78,20 @@ fi
set +e
case ${TEST_TYPE} in
lint)
pnpm prelint
pnpm lint
${TEST_CMD} prelint
${TEST_CMD} lint
retval=$?
Comment thread
pearigee marked this conversation as resolved.
;;
samples)
pnpm samples-test
${TEST_CMD} samples-test
retval=$?
;;
system)
pnpm system-test
${TEST_CMD} system-test
retval=$?
;;
units)
pnpm test
${TEST_CMD} test
retval=$?
;;
*)
Expand Down
Loading