Fix CI workflow and add comprehensive test suite#1
Merged
simonCatBot merged 10 commits intomasterfrom Apr 11, 2026
Merged
Conversation
added 10 commits
April 10, 2026 20:52
CI fixes: - Update Node.js from 20 to 22 (fixes deprecation warning) - Add test and coverage steps to CI workflow - Add Codecov upload step Testing infrastructure: - Add Jest configuration with TypeScript support - Add test setup with mocks for Next.js components - Add @testing-library/react, jest-dom, user-event dependencies Test coverage: - Unit tests for all types/metrics - Tests for CpuTab, GpuTab, MemoryTab, NetworkTab components - Tests for ROCm detection utilities - Tests for metrics API route - Tests for Dashboard component Minor fixes: - Export getMarketingName and resolveGfxVersion for testing - Update tsconfig for test compatibility
- Replace any with proper interfaces in metrics route - Add eslint-disable for setState in ThemeContext effect - Fix unused function warnings
- Add ThemeProvider/TabProvider wrappers to Dashboard tests - Update component tests to use container.textContent for styled text - Fix expected values in NetworkTab tests - Remove unused imports
- Add NextResponse mock for jsdom compatibility - Update component tests to match actual rendered output - Fix Dashboard test to work with context providers - All 69 tests passing - Lint clean with 0 errors/warnings
- Replace require() with dynamic import() in route.test.ts - Remove unused 'render' import from Dashboard.test.tsx
- Add default context values to avoid undefined checks - Add output: standalone for proper server rendering - Build now passes successfully
- Remove useEffect dependency on empty array - Simplify theme handling to avoid react-hooks/exhaustive-deps warning - All lint, tests, and build pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI fixes:
Testing infrastructure:
Test coverage:
Minor fixes: