Skip to content

ci: add frontend unit tests to CI workflow#333

Closed
shivv23 wants to merge 2 commits intoc2siorg:mainfrom
shivv23:ci/frontend-unit-tests
Closed

ci: add frontend unit tests to CI workflow#333
shivv23 wants to merge 2 commits intoc2siorg:mainfrom
shivv23:ci/frontend-unit-tests

Conversation

@shivv23
Copy link
Copy Markdown
Contributor

@shivv23 shivv23 commented Apr 27, 2026

Summary

The frontend unit tests in tensormap-frontend/src/ (42 tests across 8 test files) were never executed in CI. This PR adds a dedicated frontend-tests.yml workflow that runs vitest on every PR to main.

Changes

  • Added .github/workflows/frontend-tests.yml — runs npm run test:ci on PRs to main
  • Added test:ci script to package.json (vitest run --reporter=default) for CI-optimized output

Validation

  • All 42 frontend unit tests pass locally (8 test files, 42 tests)
  • No changes to application code

Risk

  • Zero application code changes — CI-only addition
  • Uses same Node.js version (20) and setup as existing lint workflow

Files Changed

  • tensormap-frontend/package.json — added test:ci script
  • .github/workflows/frontend-tests.yml — new frontend test workflow

shivv23 added 2 commits April 27, 2026 09:13
Split the single integration-test job into two parallel jobs:
- backend-unit-tests: runs pytest against tensormap-backend/tests/
- integration-tests: runs pytest against tests/integration/

Both jobs run on PRs to main with separate checkout and setup steps
to ensure clean environments.
Add .github/workflows/frontend-tests.yml that runs vitest on PRs to main:
- Installs dependencies via npm ci
- Runs npm run test:ci (vitest run in CI mode)
- Uses consistent node-version=20 and npm caching

Also adds 'test:ci' script to package.json for CI-optimized test execution.
@github-actions
Copy link
Copy Markdown

PR Review

Squash

Your PR has 2 commits. Please squash into a single commit.

How to fix

git fetch origin
git rebase -i origin/main   # mark all but first commit as "squash"
git push --force-with-lease

This comment updates automatically on each push.

@shivv23
Copy link
Copy Markdown
Contributor Author

shivv23 commented Apr 27, 2026

Polluted with 10+ unrelated commits. Clean version coming.

@shivv23 shivv23 closed this Apr 27, 2026
@shivv23
Copy link
Copy Markdown
Contributor Author

shivv23 commented Apr 27, 2026

Hey @ivantha, I apologize for the confusion with these PRs. The issue was that my local Git state had a polluted index with uncommitted changes from other branches — when I created the branches from what I thought was a clean origin/main, those branches ended up containing 10+ unrelated commits from the stale branch history. Both PRs showed the same 10 commits (augment, export, interpret, compare, tune) because those commits exist in main's merge history.

I've since identified this and reset everything to a clean origin/main. I'm going to create fresh PRs with orphan branches — each containing exactly 1 commit with only its relevant files. They will have no shared commits and zero conflicts. Apologies for the noise!

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.

1 participant