Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

Check warning on line 11 in .github/workflows/presubmit-bun.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

ref-version-mismatch

presubmit-bun.yaml:11: action's hash pin has mismatched or missing version comment: points to commit d23441a48e51
with:
fetch-depth: 300
persist-credentials: false
# Node.js is required by pnpm for installing dependencies.
- name: Use Node.js 22
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6

Check warning on line 17 in .github/workflows/presubmit-bun.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

ref-version-mismatch

presubmit-bun.yaml:17: action's hash pin has mismatched or missing version comment: points to commit 249970729cb0
with:
node-version: 22
# 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