Skip to content

Create tests.yml - #6

Merged
bobby404-K merged 1 commit into
mainfrom
bobby404-K-patch-2
Sep 11, 2026
Merged

bobby404-K merged 1 commit into
mainfrom
bobby404-K-patch-2

Conversation

@bobby404-K

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings September 11, 2026 08:36
@bobby404-K
bobby404-K merged commit 0536943 into main Sep 11, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 the else branch 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 -q can stop after the first result, causing find to receive SIGPIPE and the pipeline to return non-zero; the else branch then incorrectly skips pytest. Make find stop 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants