Repository navigation
Add CI workflow for testing and building project - #109
Conversation
Signed-off-by: Stuart <72906115+sgardoll@users.noreply.github.com>
| - name: Run browser tests | ||
| run: npm run test:ui | ||
|
|
||
| - name: Run accessibility modal tests | ||
| run: npm run test:accessibility |
There was a problem hiding this comment.
🔴 Missing browser scripts fail every CI run
Every run reaches test:ui and fails because that script is absent from package.json. test:accessibility is also absent, so fixing only the first command still leaves CI failing.
Learn more
The workflow calls two npm scripts that are not defined in scripts. The first missing script makes npm exit nonzero, so the job never reaches later steps. The repository has a browser test at test-key-storage, but it uses a different script name and does not cover the accessibility tests named here.
Example: A pull request reaches npm run test:ui; npm exits with Missing script: "test:ui", and the accessibility, deploy guard, proxy, and scan steps do not run.
Recommended fix: Add real test:ui and test:accessibility scripts and their tests, or replace these commands with existing scripts such as test:key-storage where appropriate. Verify both commands run successfully after npm ci.
Was this helpful? React with 👍 or 👎 to provide feedback.
| - name: Scan production bundle for API key/endpoint leaks | ||
| run: python3 scripts/scan_bundle_for_leaks.py |
There was a problem hiding this comment.
🔴 Missing bundle scanner blocks CI completion
Once earlier steps pass, scan_bundle_for_leaks.py fails because the script does not exist. The CI job cannot finish successfully.
Learn more
The final step invokes a Python script that does not exist under scripts/. Python exits with a file-not-found error. This failure is masked today by the earlier missing npm scripts, but it blocks a green run after those are repaired.
Example: After defining both browser-test npm scripts, a run passes the proxy tests and reaches the scan step. Python exits with can't open file 'scripts/scan_bundle_for_leaks.py' instead of completing CI.
Recommended fix: Commit the intended scanner before enabling this step, or remove the step until the scanner exists. Run the full job after fixing the earlier missing scripts.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
| run: npx playwright install chromium --with-deps | ||
|
|
||
| - name: Run browser tests | ||
| run: npm run test:ui |
There was a problem hiding this comment.
Browser test scripts are missing
On every PR and push to main, this step runs test:ui, which is not defined in package.json. npm exits with “Missing script,” so the CI job cannot pass. The test:accessibility step on line 47 has the same problem.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 44
Comment:
**Browser test scripts are missing**
On every PR and push to `main`, this step runs `test:ui`, which is not defined in `package.json`. npm exits with “Missing script,” so the CI job cannot pass. The `test:accessibility` step on line 47 has the same problem.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| run: npm run test:proxies | ||
|
|
||
| - name: Scan production bundle for API key/endpoint leaks | ||
| run: python3 scripts/scan_bundle_for_leaks.py |
There was a problem hiding this comment.
Bundle scanner file is missing
If the job reaches this step, Python cannot open scripts/scan_bundle_for_leaks.py because the file is not in the repository. CI fails, and the intended bundle-leak check never runs. Greptile automatically discovered a related ticket stating that CI must fail when provider API key patterns appear in the client bundle, which informed this comment.
Source Used: Linear — U2 — Gate main with required CI checks and branch protection
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 56
Comment:
**Bundle scanner file is missing**
If the job reaches this step, Python cannot open `scripts/scan_bundle_for_leaks.py` because the file is not in the repository. CI fails, and the intended bundle-leak check never runs. Greptile automatically discovered a related ticket stating that CI must fail when provider API key patterns appear in the client bundle, which informed this comment.
**Source Used:** Linear — [U2 — Gate main with required CI checks and branch protection](https://linear.app/stuart-gardoll/issue/STU-345/u2-gate-main-with-required-ci-checks-and-branch-protection)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| run: npm run build | ||
|
|
||
| - name: Install Playwright Chromium | ||
| run: npx playwright install chromium --with-deps |
There was a problem hiding this comment.
Credential browser check is omitted
The workflow installs Chromium but never runs the existing test:key-storage check. npm test runs only src/*.test.js, so once the broken browser-test steps are fixed, CI can pass without checking credential persistence, encryption-key protection, or migration behavior. Include the existing check in the browser gate.
Knowledge Base Used: Release and integration verification
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 41
Comment:
**Credential browser check is omitted**
The workflow installs Chromium but never runs the existing `test:key-storage` check. `npm test` runs only `src/*.test.js`, so once the broken browser-test steps are fixed, CI can pass without checking credential persistence, encryption-key protection, or migration behavior. Include the existing check in the browser gate.
**Knowledge Base Used:** [Release and integration verification](https://app.greptile.com/connect-i-o/-/custom-context/knowledge-base/sgardoll/customcodeconnectforflutterflow/-/docs/release-and-integration-verification.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Uh oh!
There was an error while loading. Please reload this page.