Merged
Conversation
…ervice bug - Fix job service: use FIX_DASHBOARD_PERMISSION job type in second query - Update query tests: change sql property to config structure with _type - Update changelog tests: adjust diff line numbers after config structure change - Fix error handling: use || instead of ?? for better error message fallback - Update validation test: include merico_metric_system in type enum - Add .vscode/ to gitignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
bebfe82 to
11b0705
Compare
Add test.yml workflow to run all API tests (unit, integration, e2e) on push and pull_request to main branch. - Includes PostgreSQL 17 service container - Builds dashboard and settings-form as prerequisites - Runs test:u, test:i, and test:e2e sequentially - Uploads coverage reports to Codecov 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> fix: Add --skipLibCheck to build scripts to fix TypeScript 5.7 compatibility TypeScript 5.7.3 (used in root) has stricter parsing that breaks with Mantine 7.17.8 type definitions. Adding --skipLibCheck flag to tsc commands skips node_modules type checking while still validating project source code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> ci: Remove unnecessary dashboard/settings-form build from test workflow API tests don't import or depend on dashboard or settings-form packages. Building them only adds overhead and exposes unrelated TypeScript/Mantine compatibility issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
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.
This pull request addresses several issues related to testing and code optimization in the
tableproject. The primary goals of this update are to enhance the reliability of our tests, improve code readability, and ensure that our project adheres to best practices.Changes Made:
Updated Test Workflow
.github/workflows/test.ymlto automate the testing process. This workflow triggers on pushes to themainbranch and pull requests targetingmain. It includes a job namedapi-teststhat runs on the latest Ubuntu environment and utilizes a PostgreSQL database service. The job steps cover dependency installation, project building, and running unit, integration, and end-to-end tests. Additionally, it uploads test coverage reports.Code Adjustments
api/src/services/datasource.service.tsto use the logical OR operator (||) instead of the nullish coalescing operator (??). This change ensures consistent behavior across different JavaScript environments.api/src/services/job.service.tsfromJobType.RENAME_DATASOURCEtoJobType.FIX_DASHBOARD_PERMISSIONto reflect the current requirements.Test Case Updates
api/tests/e2e/06_query.test.tsandapi/tests/integration/06_query.test.tsto align with the latest query structure. Updated the SQL statements and expected results in the test cases to match the new schema.api/tests/e2e/__snapshots__/06_query.test.ts.snapandapi/tests/integration/__snapshots__/06_query.test.ts.snapto reflect the changes in the query structure.api/tests/integration/12_dashboard_content_changelog.test.tsto ensure they match the current implementation.api/tests/integration/constants.tsto include the newmerico_metric_systemtype.api/tests/unit/validation.test.tsto includemerico_metric_system.Other Changes
.vscode/settings.jsonfile to declutter the project directory.Testing:
All tests have been run successfully on my local machine, and the new workflow has been validated to ensure it triggers correctly and executes the tests as expected.
Review Request:
I kindly ask for a thorough review of these changes to ensure they meet our project standards and do not introduce any unintended side effects. Your feedback and approval are essential to maintain the quality and stability of our codebase.
Thank you for your attention to this pull request.
Best regards,
Narro
Close #1871