Skip to content

feat: CI testing, dev/ structure, TimelineLayer, and coverage reporting#544

Merged
charlieforward9 merged 16 commits intomasterfrom
feat/vitest-ci-coverage
Mar 5, 2026
Merged

feat: CI testing, dev/ structure, TimelineLayer, and coverage reporting#544
charlieforward9 merged 16 commits intomasterfrom
feat/vitest-ci-coverage

Conversation

@charlieforward9
Copy link
Collaborator

@charlieforward9 charlieforward9 commented Mar 5, 2026

Summary

Establishes automated testing on every PR and restructures WIP work into a proper dev/ directory — the main blocker for closing #82.
Applies reviewer feedback from #512.
Modeled after deck.gl's vitest migration RFC using @vitest/browser + Playwright as first-class visgl testing utilities.
Brings in #517's TimelineLayer with full authorship preserved.


Changes

CI — .github/workflows/test.yml

Triggers on every pull_request and push to master. Three parallel jobs:

Job What it does
lint yarn lint — fast, no build
test-node build → vitest run --project node --coverage → upload LCOV to Coveralls
test-headless build → playwright install chromiumvitest run --project headless

Coverage — vitest.config.ts + @vitest/coverage-v8

Provider v8, reporters text + lcov (for Coveralls), scoped to modules/*/src/** and dev/*/src/**.

dev/ directory

Per @ibgreen's feedback in #512: canonical home for WIP modules and examples not published to npm and not indexed by the docs site.

Directory Type Status
timeline-layers/ module + examples in progress — see #517, #379
arrow-layers/ examples arrow-layers WIP examples

modules/timeline-layersdev/timeline-layers (not yet published to npm).

dev/timeline-layers — TimelineLayer from #517

All 3 commits cherry-picked via git format-patch | git amfull authorship preserved from copilot-swe-agent + @charlieforward9.

  • src/layers/timeline-layer/TimelineLayer CompositeLayer (868 lines), types, utils, collision detection, layout
  • test/timeline-layer.spec.ts — 47 unit tests: collision detection, time utils, tick generation, zoom API
  • examples/timeline-layer/ — standalone Vite app with yarn start-local wired to src/
  • vite.config.local.mjs — local dev config aliasing @deck.gl-community/timeline-layers to src/

PR #379 closed as superseded by #517.

New unit tests — 61 files / 358 tests

File Tests What's covered
dev/timeline-layers/test/timeline-layer.spec.ts 47 TimelineLayer, collision, positionToTime, timeToPosition, formatters, ticks, zoom
dev/timeline-layers/test/index.spec.ts 5 Public API smoke test incl. TimelineLayer
editable-layers/test/immutable-feature-collection.node.spec.ts 17 Position ops, polygon ring wrapping, elevation preservation
editable-layers/test/imports.node.spec.ts 6 All draw, alter, measurement, composite modes
layers/test/imports.node.spec.ts 2 PathOutlineLayer, PathMarkerLayer
widgets/test/imports.node.spec.ts 4 PanWidget, ZoomRangeWidget, HtmlOverlayWidget, HtmlTooltipWidget
geo-layers/test/imports.node.spec.ts 3 TileSourceLayer, GlobalGridLayer, grid systems

Website fixes

  • website/docusaurus.config.js — update @deck.gl-community/timeline-layers webpack alias to dev/ path
  • website/src/examples/timeline-layers/horizon-graph-layer.tsx — update require() path after move

Relates to

  • Closes a degree of #82 (9.3 roadmap — test coverage + dev/ structure)
  • Applies reviewer feedback from #512 (dev/ directory, no RFCs in docs)
  • Incorporates #517 (TimelineLayer) with preserved authorship
  • Supersedes #379 (closed)
  • Related: nebula.gl revival discussion #545

Test plan

  • yarn test-ci — 61 files, 358 tests, all pass locally
  • yarn start-local in dev/timeline-layers/examples/timeline-layer — TimelineLayer demo runs cleanly
  • lint passes (pre-commit hook)
  • Coveralls coverage report appears on this PR
  • Headless browser job green on CI

Generated with Claude Code

charlieforward9 and others added 10 commits March 1, 2026 17:24
…ists

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes a degree of #82 by establishing an automated test baseline for every PR.
Applies reviewer feedback from #512 re: dev/ directory for WIP/RFC content.

## CI workflow (.github/workflows/test.yml)
- Triggers on push to master and all pull_request events
- lint job: runs yarn lint (no build required)
- test-node job: builds, runs vitest node project with v8 coverage, uploads to Coveralls
- test-headless job: installs Playwright Chromium, runs headless browser tests

Modeled after deck.gl's test.yml (see visgl/deck.gl vitest-migration-rfc) using
@vitest/browser + Playwright as first-class visgl testing utilities.

## Coverage (vitest.config.ts + package.json)
- Added test.coverage block: provider v8, reporters text + lcov (for Coveralls)
- Scoped to modules/*/src/**, excludes basemap-props* and template
- Added test-ci script: vitest run --project node --coverage
- Added @vitest/coverage-v8 devDependency

## New unit tests (all 308 pass, 60 test files)
- modules/editable-layers/test/immutable-feature-collection.node.spec.ts
  ImmutableFeatureCollection: add/delete/replace/removePosition, polygon ring
  wrapping, 3D elevation preservation, immutability guarantees (17 tests)
- modules/editable-layers/test/imports.node.spec.ts
  Public API surface smoke test: draw, alter, and measurement mode exports (6 tests)
- modules/layers/test/imports.node.spec.ts (2 tests)
- modules/widgets/test/imports.node.spec.ts (4 tests)
- modules/geo-layers/test/imports.node.spec.ts (3 tests)

## dev/ directory
Per ibgreen's feedback in #512: establishes dev/ as the canonical home for RFCs
and WIP content that should NOT be indexed by the docs site search.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Per discussion: RFCs are better tracked as GitHub Issues or Discussions
where commenting and cross-linking are native. The docs tree stays focused
on true usability docs and basic rationale only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tay in modules/

Separates in-progress work from the published modules tree.
All npm-published 9.2.8 packages remain untouched in modules/.

Moved to dev/ (flat):
- modules/timeline-layers -> dev/timeline-layers (in progress, refs #517 #379)
  - examples/timeline-layers/horizon-graph-layer -> dev/timeline-layers/examples/
- examples/arrow-layers-wip -> dev/arrow-layers (renamed, drop -wip suffix)

Config:
- package.json + lerna.json: add dev/* to workspaces/packages
- tsconfig.json: add dev/ to include, add timeline-layers path alias
- vitest.config.ts: include dev/ in node/browser/headless globs and coverage
- keep modules/basemap-props/** excluded from node tests (uses global describe)

Rationale from #512: dev/ keeps WIP visible without polluting docs search
or the published modules tree. Design proposals live in GitHub Issues/Discussions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moving timeline-layers from modules/ to dev/ changed its workspace
identifier. Yarn 4 hardened mode on public PRs treats installs as
--immutable, so the lockfile must be committed with the updated path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ine-layers

The example was moved from examples/timeline-layers/horizon-graph-layer to
dev/timeline-layers/examples/horizon-graph-layer. Update the website component
require() and code link to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Follows the move of modules/timeline-layers → dev/timeline-layers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: charlieforward9 <62311337+charlieforward9@users.noreply.github.com>
…ine-types, use in TrackWithSubtracks

Co-authored-by: charlieforward9 <62311337+charlieforward9@users.noreply.github.com>
…tection, time utils

Co-authored-by: charlieforward9 <62311337+charlieforward9@users.noreply.github.com>
…etup

- Add dev/timeline-layers/examples/* to root workspace glob so yarn
  resolves the package correctly
- Add vite.config.local.mjs (aliases @deck.gl-community/timeline-layers
  to src/ so dist/ is never stale during dev)
- Fix tsconfig.json extends depth (examples/ moved one level deeper vs
  original PR path)
- Update example README with prototype video + end-goal screenshot from
  PR #379, start-local instructions, and context links to #379/#517/#38

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@charlieforward9 charlieforward9 changed the title feat(ci): PR test workflow, v8 coverage + Coveralls, and unit tests feat: CI testing, dev/ structure, TimelineLayer, and coverage reporting Mar 5, 2026
charlieforward9 and others added 2 commits March 5, 2026 02:04
The global permissions block only had contents:read. Coveralls needs
pull-requests:write to post a coverage comment and checks:write for
the status check. Scoped to test-node job only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace Coveralls upload (which requires the Coveralls GitHub App to be
installed on the org to post PR comments) with an actions/github-script
step that reads the vitest coverage table from stdout and posts/updates
it as a PR comment directly. No external service setup needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Coverage

Stmts: 30.79% | Branch: 26.58% | Funcs: 28.86% | Lines: 30.87%

�[2m Test Files �[22m �[1m�[32m61 passed�[39m�[22m�[90m (61)�[39m

charlieforward9 and others added 3 commits March 5, 2026 02:21
test.yaml was the original single-job workflow. test.yml replaced it
with parallel lint/test-node/test-headless jobs. Both were running on
every PR causing duplicate test-node checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace verbose per-file table with a single "All files" totals line.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Save "All files" line as artifact on master pushes
- On PRs, find + download latest master baseline artifact
- Show delta (▲/▼/●) next to each metric vs master

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@charlieforward9 charlieforward9 merged commit e957360 into master Mar 5, 2026
3 checks passed
@charlieforward9 charlieforward9 deleted the feat/vitest-ci-coverage branch March 5, 2026 07:31
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.

2 participants