Repository navigation
Create tests.yml - #6
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved moderate findings can skip Python validation and mask test discovery failures.
Pull request overview
Adds GitHub Actions CI for Python, notebooks, and optional JavaScript/TypeScript validation.
Changes:
- Runs on pushes and pull requests targeting
main. - Installs dependencies and conditionally runs tests and notebook checks.
- Runs optional npm tests, linting, and builds.
File summaries
| File | Summary and findings |
|---|---|
.github/workflows/tests.yml |
Defines the CI workflow. Moderate (1 vote): Python validation is skipped when no tests exist. Moderate (1 vote): grep -q may cause SIGPIPE and mask test discovery. Nit (1 vote): The JavaScript job runs unnecessarily without a package.json. |
Review details
Suppressed comments (3)
.github/workflows/tests.yml:47
- In this repository there are no Python test files, so this branch always prints the skip message and the Python job never executes any code under
src. A green CI run therefore cannot catch regressions in the analyzer; add a real smoke/integration assertion or add tests instead of treating the absence of tests as success.
if find . -type f \( -name "test_*.py" -o -name "*_test.py" \) \
-not -path "./.git/*" | grep -q .; then
pytest
else
echo "No Python tests found — skipping."
.github/workflows/tests.yml:96
- This repository has no
package.json, so this job always spends a separate runner setup on theelsebranch and performs no JavaScript/TypeScript validation. Remove this unused job for the Python-only project, or restructure the workflow so the job is not scheduled when a JavaScript project is absent.
if [ -f package-lock.json ]; then
npm ci
elif [ -f package.json ]; then
npm install
else
echo "No package.json found — skipping."
exit 0
.github/workflows/tests.yml:44
- This discovery pipeline runs under GitHub Actions'
bash -eo pipefail. With multiple matching test files,grep -qcan stop after the first result, causingfindto receive SIGPIPE and the pipeline to return non-zero; theelsebranch then incorrectly skipspytest. Makefindstop after the first match so the check cannot be masked by SIGPIPE.
if find . -type f \( -name "test_*.py" -o -name "*_test.py" \) \
-not -path "./.git/*" | grep -q .; then
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
No description provided.