Skip to content

ci: add basic CI pipeline for tests and linting#233

Merged
pradeeban merged 3 commits intoControlCore-Project:devfrom
GaneshPatil7517:ci/add-basic-testing-pipeline
Feb 9, 2026
Merged

ci: add basic CI pipeline for tests and linting#233
pradeeban merged 3 commits intoControlCore-Project:devfrom
GaneshPatil7517:ci/add-basic-testing-pipeline

Conversation

@GaneshPatil7517
Copy link
Copy Markdown
Contributor

@GaneshPatil7517 GaneshPatil7517 commented Feb 9, 2026

This PR adds a minimal GitHub Actions CI workflow for the concore repository. The workflow automatically runs linting and tests on every push and pull request to help ensure code quality and catch issues early.

What's Included

  1. Setup for Python 3.11 with pip caching to speed up dependency installation
  2. Installation of project dependencies from requirements.txt
  3. Linting with ruff to detect syntax errors, undefined variables, and invalid print usage
  4. Test execution using pytest
  5. Validation to ensure Dockerfile.py builds correctly

Configuration Notes
Some directories are excluded from linting and testing because they contain experimental or configuration-dependent scripts:

  1. measurements/ - benchmark scripts that require external port configuration
  2. 0mq/ - ZeroMQ examples that depend on external variable definitions
  3. ratc/ - experimental code with known issues
  4. linktest/ - contains symlink files rather than Python code
  5. Dockerfile.* - Docker files that use the .py extension but are not Python scripts

Why This Matters
Helps prevent broken code from being merged
Detects syntax and import errors early in development
Improves the feedback loop for contributors
Provides a foundation for expanding automated testing in the future

Verification

  1. Linting passes locally using ruff check .
  2. pytest runs without collection errors
  3. The existing draft-pdf.yml workflow remains unchanged

Fixes #232

Copilot AI review requested due to automatic review settings February 9, 2026 11:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub Actions workflow to provide basic continuous integration for the repo (linting, pytest invocation, and a Dockerfile build check) on pushes and pull requests to the main branches.

Changes:

  • Introduces .github/workflows/ci.yml to run Ruff checks for a small set of syntax/critical errors.
  • Runs pytest with several directories ignored.
  • Validates Dockerfile.py by attempting a docker build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Use minimal requirements-ci.txt (no tensorflow/heavy deps)
- Handle pytest exit code 5 (no tests) vs real failures
- Move Dockerfile build to separate job with path filter
- Add pyzmq to CI deps (required by concore.py)
@pradeeban
Copy link
Copy Markdown
Member

@GaneshPatil7517 I see you are creating PRs against the main branch. Please create those against the dev branch. In this case, I was able to switch the branch to dev. Developing against the dev branch will ensure there is no repeated effort on an already fixed issue.

- Add set +e before pytest to prevent bash -e from exiting on code 5
- Add dev branch to push/pull_request triggers per maintainer request
@GaneshPatil7517
Copy link
Copy Markdown
Contributor Author

Hi @pradeeban, thanks for the heads up! I've updated the PR base branch to dev. I also added dev to the CI workflow triggers so it runs on pushes and PRs to dev as well. Let me know if anything else needs to be adjusted.

@pradeeban pradeeban merged commit d155182 into ControlCore-Project:dev Feb 9, 2026
@pradeeban
Copy link
Copy Markdown
Member

Merged. Thanks.

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.

No CI/CD for testing — only draft-pdf.yml workflow exists

3 participants