test: Test built package in CI#2664
Conversation
|
pkg.pr.new packages benchmark commit |
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 320 | 0 | 0 |
import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):
Click to reveal the results table (297 entries).
| Test | tsdown |
|---|---|
| d_Void.ts | 87.41 kB ( |
| d_sampler.ts | 87.41 kB ( |
| d_isPtr.ts | 87.41 kB ( |
| d_comparisonSampler.ts | 87.42 kB ( |
| d_isSizeAttrib.ts | 87.42 kB ( |
| d_isWgslArray.ts | 87.42 kB ( |
| d_isAlignAttrib.ts | 87.42 kB ( |
| d_isWgslStruct.ts | 87.42 kB ( |
| d_isAtomic.ts | 87.41 kB ( |
| d_isBuiltinAttrib.ts | 87.42 kB ( |
| d_isLocationAttrib.ts | 87.42 kB ( |
| d_isDecorated.ts | 87.42 kB ( |
| d_isInterpolateAttrib.ts | 87.42 kB ( |
| d_atomic.ts | 87.41 kB ( |
| d_ptrHandle.ts | 87.41 kB ( |
| d_ptrUniform.ts | 87.41 kB ( |
| d_ptrStorage.ts | 87.41 kB ( |
| d_ptrPrivate.ts | 87.41 kB ( |
| d_ptrFn.ts | 87.41 kB ( |
| d_ptrWorkgroup.ts | 87.42 kB ( |
| d_textureExternal.ts | 87.42 kB ( |
| d_textureStorage1d.ts | 87.42 kB ( |
| d_textureStorage2d.ts | 87.42 kB ( |
| d_textureStorage3d.ts | 87.42 kB ( |
| d_textureStorage2dArray.ts | 87.42 kB ( |
| d_isDisarray.ts | 87.41 kB ( |
| d_isUnstruct.ts | 87.41 kB ( |
| d_isLooseDecorated.ts | 87.42 kB ( |
| d_isLooseData.ts | 87.42 kB ( |
| d_isWgslData.ts | 87.41 kB ( |
| d_unstruct.ts | 87.41 kB ( |
| d_isData.ts | 87.41 kB ( |
| d_deepEqual.ts | 87.41 kB ( |
| d_struct.ts | 87.41 kB ( |
| d_ref.ts | 87.41 kB ( |
| std_discard.ts | 103.15 kB ( |
| std_copy.ts | 103.14 kB ( |
| std_arrayLength.ts | 103.15 kB ( |
| std_isBeingTranspiled.ts | 103.16 kB ( |
| std_getTargetShaderLanguage.ts | 103.16 kB ( |
| std_extensionEnabled.ts | 103.16 kB ( |
| std_range.ts | 103.14 kB ( |
| std_dpdx.ts | 103.14 kB ( |
| std_fwidthCoarse.ts | 103.15 kB ( |
| std_dpdxCoarse.ts | 103.15 kB ( |
| std_dpdyCoarse.ts | 103.15 kB ( |
| std_fwidthFine.ts | 103.15 kB ( |
| std_dpdxFine.ts | 103.15 kB ( |
| std_dpdyFine.ts | 103.15 kB ( |
| std_fwidth.ts | 103.15 kB ( |
| std_dpdy.ts | 103.14 kB ( |
| d_bool.ts | 87.41 kB ( |
| d_f16.ts | 87.41 kB ( |
| d_f32.ts | 87.41 kB ( |
| d_i32.ts | 87.41 kB ( |
| d_u32.ts | 87.41 kB ( |
| d_u16.ts | 87.41 kB ( |
| std_atomicLoad.ts | 103.15 kB ( |
| std_textureBarrier.ts | 103.15 kB ( |
| std_atomicStore.ts | 103.15 kB ( |
| std_workgroupBarrier.ts | 103.16 kB ( |
| std_storageBarrier.ts | 103.15 kB ( |
| std_atomicAdd.ts | 103.15 kB ( |
| std_atomicAnd.ts | 103.15 kB ( |
| std_atomicMax.ts | 103.15 kB ( |
| std_atomicMin.ts | 103.15 kB ( |
| std_atomicSub.ts | 103.15 kB ( |
| std_atomicXor.ts | 103.15 kB ( |
| std_atomicOr.ts | 103.15 kB ( |
| d_textureDepth2d.ts | 87.42 kB ( |
| d_textureDepthCube.ts | 87.42 kB ( |
| d_texture1d.ts | 87.41 kB ( |
| d_texture2d.ts | 87.41 kB ( |
| d_texture3d.ts | 87.41 kB ( |
| d_textureDepth2dArray.ts | 87.42 kB ( |
| d_textureCube.ts | 87.42 kB ( |
| d_textureDepthCubeArray.ts | 87.42 kB ( |
| d_textureDepthMultisampled2d.ts | 87.43 kB ( |
| d_texture2dArray.ts | 87.42 kB ( |
| d_textureCubeArray.ts | 87.42 kB ( |
| d_textureMultisampled2d.ts | 87.42 kB ( |
| d_disarrayOf.ts | 87.41 kB ( |
| d_vec2b.ts | 87.41 kB ( |
| d_vec2f.ts | 87.41 kB ( |
| d_vec2h.ts | 87.41 kB ( |
| d_vec2i.ts | 87.41 kB ( |
| d_vec2u.ts | 87.41 kB ( |
| d_vec3b.ts | 87.41 kB ( |
| d_vec3f.ts | 87.41 kB ( |
| d_vec3h.ts | 87.41 kB ( |
| d_vec3i.ts | 87.41 kB ( |
| d_vec3u.ts | 87.41 kB ( |
| d_vec4b.ts | 87.41 kB ( |
| d_vec4f.ts | 87.41 kB ( |
| d_vec4h.ts | 87.41 kB ( |
| d_vec4i.ts | 87.41 kB ( |
| d_vec4u.ts | 87.41 kB ( |
| std_subgroupAdd.ts | 103.15 kB ( |
| std_subgroupBroadcastFirst.ts | 103.16 kB ( |
| std_subgroupExclusiveAdd.ts | 103.16 kB ( |
| std_subgroupExclusiveMul.ts | 103.16 kB ( |
| std_subgroupInclusiveAdd.ts | 103.16 kB ( |
| std_subgroupInclusiveMul.ts | 103.16 kB ( |
| std_subgroupShuffleDown.ts | 103.16 kB ( |
| std_subgroupShuffleXor.ts | 103.16 kB ( |
| std_subgroupBroadcast.ts | 103.16 kB ( |
| std_subgroupShuffleUp.ts | 103.16 kB ( |
| std_subgroupShuffle.ts | 103.15 kB ( |
| std_subgroupBallot.ts | 103.15 kB ( |
| std_subgroupElect.ts | 103.15 kB ( |
| std_subgroupAll.ts | 103.15 kB ( |
| std_subgroupAnd.ts | 103.15 kB ( |
| std_subgroupAny.ts | 103.15 kB ( |
| std_subgroupMax.ts | 103.15 kB ( |
| std_subgroupMin.ts | 103.15 kB ( |
| std_subgroupMul.ts | 103.15 kB ( |
| std_subgroupXor.ts | 103.15 kB ( |
| std_subgroupOr.ts | 103.15 kB ( |
| d_formatToWGSLType.ts | 87.42 kB ( |
| d_uint8.ts | 87.41 kB ( |
| d_unorm10_10_10_2.ts | 87.42 kB ( |
| d_unorm8x4_bgra.ts | 87.42 kB ( |
| d_float16x2.ts | 87.41 kB ( |
| d_float16x4.ts | 87.41 kB ( |
| d_float32x2.ts | 87.41 kB ( |
| d_float32x3.ts | 87.41 kB ( |
| d_float32x4.ts | 87.41 kB ( |
| d_snorm16x2.ts | 87.41 kB ( |
| d_snorm16x4.ts | 87.41 kB ( |
| d_unorm16x2.ts | 87.41 kB ( |
| d_unorm16x4.ts | 87.41 kB ( |
| d_sint16x2.ts | 87.41 kB ( |
| d_sint16x4.ts | 87.41 kB ( |
| d_sint32x2.ts | 87.41 kB ( |
| d_sint32x3.ts | 87.41 kB ( |
| d_sint32x4.ts | 87.41 kB ( |
| d_snorm8x2.ts | 87.41 kB ( |
| d_snorm8x4.ts | 87.41 kB ( |
| d_uint16x2.ts | 87.41 kB ( |
| d_uint16x4.ts | 87.41 kB ( |
| d_uint32x2.ts | 87.41 kB ( |
| d_uint32x3.ts | 87.41 kB ( |
| d_uint32x4.ts | 87.41 kB ( |
| d_unorm8x2.ts | 87.41 kB ( |
| d_unorm8x4.ts | 87.41 kB ( |
| d_float16.ts | 87.41 kB ( |
| d_float32.ts | 87.41 kB ( |
| d_sint8x2.ts | 87.41 kB ( |
| d_sint8x4.ts | 87.41 kB ( |
| d_snorm16.ts | 87.41 kB ( |
| d_uint8x2.ts | 87.41 kB ( |
| d_uint8x4.ts | 87.41 kB ( |
| d_unorm16.ts | 87.41 kB ( |
| d_sint16.ts | 87.41 kB ( |
| d_sint32.ts | 87.41 kB ( |
| d_snorm8.ts | 87.41 kB ( |
| d_uint16.ts | 87.41 kB ( |
| d_uint32.ts | 87.41 kB ( |
| d_unorm8.ts | 87.41 kB ( |
| d_sint8.ts | 87.41 kB ( |
| d_packedFormats.ts | 87.42 kB ( |
| d_isPackedData.ts | 87.42 kB ( |
| std_textureDimensions.ts | 103.16 kB ( |
| std_textureGather.ts | 103.15 kB ( |
| std_textureSampleBaseClampToEdge.ts | 103.17 kB ( |
| std_textureSampleCompareLevel.ts | 103.16 kB ( |
| std_textureSampleCompare.ts | 103.16 kB ( |
| std_textureSampleLevel.ts | 103.16 kB ( |
| std_textureSampleBias.ts | 103.16 kB ( |
| std_textureSampleGrad.ts | 103.16 kB ( |
| std_textureSample.ts | 103.15 kB ( |
| std_textureStore.ts | 103.15 kB ( |
| std_textureLoad.ts | 103.15 kB ( |
| d_alignmentOf.ts | 87.42 kB ( |
| std_translation4.ts | 103.15 kB ( |
| std_rotationX4.ts | 103.15 kB ( |
| std_rotationY4.ts | 103.15 kB ( |
| std_rotationZ4.ts | 103.15 kB ( |
| std_identity2.ts | 103.15 kB ( |
| std_identity3.ts | 103.15 kB ( |
| std_identity4.ts | 103.15 kB ( |
| std_scaling4.ts | 103.15 kB ( |
| d_isBuiltin.ts | 87.41 kB ( |
| d_sizeOf.ts | 87.41 kB ( |
| d_isContiguous.ts | 87.42 kB ( |
| d_getLongestContiguousPrefix.ts | 87.43 kB ( |
| d_arrayOf.ts | 87.41 kB ( |
| d_size.ts | 87.41 kB ( |
| d_align.ts | 87.41 kB ( |
| d_location.ts | 87.41 kB ( |
| d_interpolate.ts | 87.42 kB ( |
| d_invariant.ts | 87.41 kB ( |
| d_mat4x4f.ts | 87.41 kB ( |
| d_mat2x2f.ts | 87.41 kB ( |
| d_mat3x3f.ts | 87.41 kB ( |
| d_matToArray.ts | 87.41 kB ( |
| d_builtin.ts | 87.41 kB ( |
| std_unpack2x16float.ts | 103.15 kB ( |
| std_unpack4x8unorm.ts | 103.15 kB ( |
| std_pack2x16float.ts | 103.15 kB ( |
| std_pack4x8unorm.ts | 103.15 kB ( |
| std_bitcastU32toF32.ts | 103.15 kB ( |
| std_bitcastU32toI32.ts | 103.15 kB ( |
| std_neg.ts | 103.14 kB ( |
| std_bitShiftRight.ts | 103.15 kB ( |
| std_bitShiftLeft.ts | 103.15 kB ( |
| std_add.ts | 103.14 kB ( |
| std_div.ts | 103.14 kB ( |
| std_mod.ts | 103.14 kB ( |
| std_mul.ts | 103.14 kB ( |
| std_sub.ts | 103.14 kB ( |
| std_translate4.ts | 103.15 kB ( |
| std_rotateX4.ts | 103.15 kB ( |
| std_scale4.ts | 103.15 kB ( |
| std_rotateY4.ts | 103.15 kB ( |
| std_rotateZ4.ts | 103.15 kB ( |
| d_memoryLayoutOf.ts | 87.42 kB ( |
| std_and.ts | 103.14 kB ( |
| std_or.ts | 103.14 kB ( |
| std_select.ts | 103.15 kB ( |
| std_allEq.ts | 103.14 kB ( |
| std_all.ts | 103.14 kB ( |
| std_not.ts | 103.14 kB ( |
| std_eq.ts | 103.14 kB ( |
| std_lt.ts | 103.14 kB ( |
| std_ne.ts | 103.14 kB ( |
| std_isCloseTo.ts | 103.15 kB ( |
| std_any.ts | 103.14 kB ( |
| std_ge.ts | 103.14 kB ( |
| std_gt.ts | 103.14 kB ( |
| std_le.ts | 103.14 kB ( |
| std_dot4U8Packed.ts | 103.15 kB ( |
| std_length.ts | 103.15 kB ( |
| std_countTrailingZeros.ts | 103.16 kB ( |
| std_distance.ts | 103.15 kB ( |
| std_dot.ts | 103.14 kB ( |
| std_countLeadingZeros.ts | 103.16 kB ( |
| std_firstTrailingBit.ts | 103.16 kB ( |
| std_firstLeadingBit.ts | 103.15 kB ( |
| std_fract.ts | 103.14 kB ( |
| std_frexp.ts | 103.14 kB ( |
| std_modf.ts | 103.14 kB ( |
| std_quantizeToF16.ts | 103.15 kB ( |
| std_mix.ts | 103.14 kB ( |
| std_countOneBits.ts | 103.15 kB ( |
| std_dot4I8Packed.ts | 103.15 kB ( |
| std_determinant.ts | 103.15 kB ( |
| std_extractBits.ts | 103.15 kB ( |
| std_faceForward.ts | 103.15 kB ( |
| std_inverseSqrt.ts | 103.15 kB ( |
| std_reverseBits.ts | 103.15 kB ( |
| std_insertBits.ts | 103.15 kB ( |
| std_smoothstep.ts | 103.15 kB ( |
| std_normalize.ts | 103.15 kB ( |
| std_transpose.ts | 103.15 kB ( |
| std_saturate.ts | 103.15 kB ( |
| std_degrees.ts | 103.15 kB ( |
| std_radians.ts | 103.15 kB ( |
| std_reflect.ts | 103.15 kB ( |
| std_refract.ts | 103.15 kB ( |
| std_acosh.ts | 103.14 kB ( |
| std_asinh.ts | 103.14 kB ( |
| std_atan2.ts | 103.14 kB ( |
| std_atanh.ts | 103.14 kB ( |
| std_clamp.ts | 103.14 kB ( |
| std_cross.ts | 103.14 kB ( |
| std_floor.ts | 103.14 kB ( |
| std_ldexp.ts | 103.14 kB ( |
| std_round.ts | 103.14 kB ( |
| std_trunc.ts | 103.14 kB ( |
| std_acos.ts | 103.14 kB ( |
| std_asin.ts | 103.14 kB ( |
| std_atan.ts | 103.14 kB ( |
| std_ceil.ts | 103.14 kB ( |
| std_cosh.ts | 103.14 kB ( |
| std_exp2.ts | 103.14 kB ( |
| std_log2.ts | 103.14 kB ( |
| std_sign.ts | 103.14 kB ( |
| std_sinh.ts | 103.14 kB ( |
| std_sqrt.ts | 103.14 kB ( |
| std_step.ts | 103.14 kB ( |
| std_tanh.ts | 103.14 kB ( |
| std_abs.ts | 103.14 kB ( |
| std_cos.ts | 103.14 kB ( |
| std_exp.ts | 103.14 kB ( |
| std_fma.ts | 103.14 kB ( |
| std_log.ts | 103.14 kB ( |
| std_max.ts | 103.14 kB ( |
| std_min.ts | 103.14 kB ( |
| std_pow.ts | 103.14 kB ( |
| std_sin.ts | 103.14 kB ( |
| std_tan.ts | 103.14 kB ( |
| common_fullScreenTriangle.ts | 57.18 kB ( |
| common_writeSoA.ts | 57.17 kB ( |
| STATIC_allImports.ts | 287.20 kB ( |
| STATIC_d.ts | 87.40 kB ( |
| STATIC_std.ts | 103.14 kB ( |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.94, 1.85, 3.99, 6.25, 7.33, 11.02, 22.18, 26.22]
line [0.88, 1.91, 4.12, 6.86, 7.85, 11.99, 24.56, 26.41]
line [0.94, 1.96, 3.97, 6.52, 7.93, 11.30, 22.79, 23.38]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.32, 0.59, 0.75, 0.92, 1.21, 1.24, 1.43, 1.56]
line [0.30, 0.52, 0.73, 0.90, 1.20, 1.27, 1.54, 1.59]
line [0.30, 0.51, 0.71, 0.84, 1.12, 1.26, 1.51, 1.62]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.85, 2.13, 4.02, 6.48, 12.95, 26.29, 56.36, 113.08]
line [0.85, 2.23, 3.91, 6.85, 13.37, 27.63, 59.69, 117.09]
line [1.00, 2.16, 4.27, 6.37, 12.54, 26.63, 56.17, 115.59]
|
94a1e2f to
0f423f0
Compare
|
|
||
| - name: Test | ||
| run: pnpm test | ||
| - name: Build docs |
There was a problem hiding this comment.
Docs are now built as part of the test script
|
@pullfrog review |
There was a problem hiding this comment.
Important
Two concerns need attention before merging: the packages/typegpu/package.json rewrite is fragile in a shared workspace, and the docs build was dropped from CI without explanation.
Reviewed changes — CI now builds all packages before running unit tests and sets TEST_BUILT=1 so packages/typegpu can run its suite against the built artifact. The implementation rewrites packages/typegpu/package.json to simulate publish-time exports, and adds a WebGPU-device-request fixture so React tests no longer need to spy on tgpu.init.
packages/typegpu/setupVitest.ts— OnTEST_BUILT=1, mergespublishConfigintopackages/typegpu/package.jsonat setup and restores it on teardown.packages/typegpu/vitest.config.mts— Excludestests/internal/**/*when running against the built package.packages/typegpu-testing-utility/src/extendedIt.ts— Adds_stallDeviceRequestinternal fixture and publicstallDeviceRequesthelper.packages/typegpu-react/tests/root-context.test.tsx— Replacesvi.spyOn(tgpu, 'init')with the newstallDeviceRequestfixture.package.json—testscript now runspnpm run -r buildand exportsTEST_BUILT=1for the unit-test step..github/workflows/ci.yml— Removes the separateBuild docsstep.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Pull request overview
This PR updates the CI test flow so unit tests exercise the built typegpu package output (from dist) rather than the source layout, aligning CI with what users consume from the published package.
Changes:
- Build all workspace packages before unit tests and run unit tests with
TEST_BUILT=1. - In the
typegpupackage’s Vitest setup, temporarily applypublishConfig-style package resolution during tests. - Add a test utility to stall device acquisition and refactor a React root cleanup test to use it.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/typegpu/vitest.config.mts | Uses TEST_BUILT to adjust Vitest exclusions (skip tests/internal when validating the built package). |
| packages/typegpu/setupVitest.ts | Adds TEST_BUILT env handling and rewrites/restores packages/typegpu/package.json to behave like published output during tests. |
| packages/typegpu-testing-utility/src/extendedIt.ts | Adds stallDeviceRequest helper and updates adapter mock to optionally delay requestDevice. |
| packages/typegpu-react/tests/root-context.test.tsx | Updates unmount/late-init cleanup test to use stallDeviceRequest rather than mocking tgpu.init. |
| package.json | Updates root test script to build first and set TEST_BUILT=1 for unit/attest tests. |
| .github/workflows/ci.yml | Simplifies CI by relying on pnpm test (docs build step removed). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Important
This PR removes the docs build from the CI check. Please confirm that's intentional, or restore a docs-build gate for pull requests.
Reviewed changes — CI now builds packages before running tests, and the typegpu unit/attest tests resolve typegpu imports against the built dist/ via a runtime package.json rewrite in setupVitest.ts.
package.jsontest script — builds all packages and setsTEST_BUILT=1before unit/attest tests.setupVitest.ts— whenTEST_BUILTis set, mergespublishConfiginto the top-levelpackage.jsonso module resolution points at the built outputs; restores the original file on teardown.vitest.config.mts— excludestests/internal/**/*when running against the built package.extendedIt.ts/root-context.test.tsx— replaces atgpu.initspy that is hard to use against built exports with a newstallDeviceRequestfixture that stalls the mocked adapter'srequestDevice..github/workflows/ci.yml— removes the explicitBuild docsstep.
⚠️ Docs build no longer runs in CI
Previously ci.yml ran cd apps/typegpu-docs && pnpm build after tests. This PR removes that step. test:types still runs astro check via the filtered test:types script, but astro check alone does not perform the full astro build. The deploy-docs.yml workflow only builds the docs app on pushes to the release branch, so a docs-only build break could land on main undetected.
Technical details
### ⚠️ Docs build no longer runs in CI
## Affected sites
- `.github/workflows/ci.yml` — removed `Build docs` step.
- `package.json:27` — `test:types` runs `astro check`, not `astro build`.
## Required outcome
PR checks should continue to guarantee that the docs app can build, or the team should intentionally move that gate elsewhere.
## Suggested approach
Either restore a docs-build job in `ci.yml` or add a dedicated PR workflow that runs `cd apps/typegpu-docs && pnpm build`. If the build was removed to save time, document that trade-off in the PR description or task list.
## Open questions for the human
- Is the removal of the docs build intentional, or a side effect of rearranging the `test` script?
- If intentional, is a separate change adding docs-build coverage back?ℹ️ setupVitest.ts mutates a tracked package.json in place
usePublishConfig() overwrites packages/typegpu/package.json at test startup to point resolution at dist/, then restores it in teardown. The restore runs on normal completion and in the catch block, but it cannot run if the process exits abnormally. In ephemeral CI that is harmless, but locally the working tree can be left dirty and a developer could accidentally commit the mutated file.
Technical details
### ℹ️ `setupVitest.ts` mutates a tracked `package.json` in place
## Affected sites
- `packages/typegpu/setupVitest.ts:22-41` — `usePublishConfig` reads, rewrites, and later restores `package.json`.
## Required outcome
The built-package test gate must not leave the repository in a modified state or race on a shared tracked file.
## Suggested approach
Consider avoiding an in-place edit of a tracked file:
- Use a temporary directory with a synthetic `package.json` and point Vite/Node resolution at it.
- Use Vitest alias / `resolve.conditions` overrides to force resolution to `dist/` without touching source files.
- If the rewrite stays, fail loudly on teardown if the file doesn't match the original so a leaked mutation is visible immediately.Kimi K2 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ New commit fixes the
stallDeviceRequesterror message.
The incremental change rewords the stallDeviceRequest error so it describes the fixture accurately. No new issues in this delta.
Reviewed changes (incremental) — a single follow-up commit that updates the stallDeviceRequest error message.
packages/typegpu-testing-utility/src/extendedIt.ts—stallDeviceRequestnow throwsCannot stall .requestDevice() more than once at a time.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
I don't think we can just forget about internal tests in CI. See #2668, it passes despite broken tests
c9d35e2 to
4c0ed9e
Compare
There was a problem hiding this comment.
Important
The alias-based built-package resolution works for today's subpaths, but the alias list and typegpu exports are maintained in two different files. A subpath added to one without the other would cause TEST_BUILT=1 tests to silently import source files instead of the built artifact.
Reviewed changes — Replaced the runtime package.json rewrite with Vite aliases that redirect typegpu subpaths to their $built$ exports when TEST_BUILT=1 is set.
- Removed
package.jsonmutation —packages/typegpu/setupVitest.tsno longer rewritespackages/typegpu/package.json; it only configures@ark/attest. - Added
typegpuBuiltAliases()inpackages/typegpu-testing-utility/src/config.ts— provides Vite aliases for the currenttypegpusubpaths. - Wired aliases into workspace Vitest configs — root,
packages/typegpu,packages/typegpu-react,packages/typegpu-gl, andapps/typegpu-docs. - Switched React cleanup test to the
stallDeviceRequestfixture and dropped thetgpu.initspy.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
aleksanderkatan
left a comment
There was a problem hiding this comment.
Great, this approach looks much cleaner! 📝🛠️
There was a problem hiding this comment.
ℹ️ No new issues in this delta.
Reviewed changes — The test script was split into a source-only pass and a built-package pass so internal tests continue to run in CI alongside the new built-package validation.
package.jsontest scripts —testnow runstest:unit-and-attest(source) followed bytest:built-unit-and-attest(built).test:built-unit-and-attestbuilds allpackages/*and runs unit/attest tests withTEST_BUILT=1.- This keeps
tests/internal/**/*in CI via the source pass while still validating published artifacts via the built pass.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — The latest commit restores the docs-build gate in CI and switches apps/typegpu-docs to the shared typegpuBuiltAliases helper.
- Restored the
Build docsstep in.github/workflows/ci.yml— addresses the earlier concern that removing the docs build from PR checks could let docs-only breakages land onmain. - Updated
apps/typegpu-docs/vitest.config.mtsto importtypegpuBuiltAliasesfromtypegpu-testing-utility/config, so docs tests resolvetypegpuagainst the built artifacts underTEST_BUILT=1using the same aliases as the rest of the workspace.
Kimi K2 (free via Pullfrog for OSS) | 𝕏

No description provided.