feat: add parallel Vitest test suite and cross-repo CI trigger (issue #49)#55
feat: add parallel Vitest test suite and cross-repo CI trigger (issue #49)#55aditya-8787 wants to merge 1 commit intometacall:masterfrom
Conversation
|
@viferga as we discussed, I have started working on the testing improvements |
|
This is wrong. I can't merge it. |
|
@viferga Before I proceed further, I wanted to share my plan Here is what I am planning next:
Does this align with what you had in mind? Let me know if I should |
|
You added vitest but it was not strictly necessary. What we needed is adding a proper testing that triggers deploy and faas repositories. We have added them recently with @Priyanshu-u07 |
What this PR does
Foundation PR for improving test reliability across metacall/protocol,
metacall/faas and metacall/deploy as discussed in issue #49 .
Changes
vitest.config.jstest/*.vitest.tsonlytest/protocol.vitest.tspackage.jsontest:vitestandtest:coveragescripts.github/workflows/ci.ymlApproach
1. Parallel test suite
New tests live in
test/*.vitest.ts. Mocha picks updist/test/*.jssothe two runners never conflict. Mocha stays non-blocking
(continue-on-error: true) since CI is already known fragile. Old tests
removed only once full TypeScript coverage is verified — clean cut, not
a dragged-out migration.
2. Cross-repo CI trigger
Added repository_dispatch: protocol-updated to CI so faas and deploy can
be pinged when protocol master changes. Downstream workflows that install
protocol from GitHub master instead of pinned npm are follow-up PRs in
those repos.
3. Secrets handling
pull_request_target + protected environment approach for METACALL_API_KEY
belongs in the deploy repo — will be handled there.
Test results
✓ index module loads without errors
✓ has correct package name
✓ has a valid semver version string
✓ deployment module loads
✓ login module loads
✓ token module loads
✓ plan module loads
✓ signup module loads
✓ language module loads
✓ package module loads
✓ protocol module loads
Test Files: 1 passed | Tests: 11 passed | Duration: 539ms
What comes next
protocol from GitHub master instead of pinned npm