Repository navigation
Add CI workflow for automated linting and validation - #2
Conversation
Co-authored-by: corcondor <234616481+corcondor@users.noreply.github.com>
Co-authored-by: corcondor <234616481+corcondor@users.noreply.github.com>
Co-authored-by: corcondor <234616481+corcondor@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow to run basic linting and multi-version Python validation on pushes/PRs to main, aiming to catch syntax and import issues before merge.
Changes:
- Added
.github/workflows/ci.ymlwith a flake8 lint job (syntax/undefined-name checks + metrics output). - Added a validation job that runs
py_compileand an import check across Python 3.8–3.12. - Restricted workflow token permissions to
contents: read.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install flake8 | ||
|
|
There was a problem hiding this comment.
The workflow installs flake8/numpy without pinning versions. That can make CI nondeterministic over time (a new flake8 rule release could start failing PRs unexpectedly). Consider pinning tool dependencies (e.g., via explicit versions or a constraints/requirements file) so CI behavior is stable and reproducible.
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install numpy |
There was a problem hiding this comment.
These steps invoke pip directly. Using python -m pip ... avoids PATH ambiguity and guarantees the installs target the interpreter configured by actions/setup-python (especially important in the matrix job).
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install flake8 | ||
|
|
There was a problem hiding this comment.
Lint job also calls pip install ... directly. Switching to python -m pip ... ensures the packages are installed into the Python 3.8 environment set up by actions/setup-python, rather than whichever pip happens to be first on PATH.
Adds continuous integration to catch syntax errors and compatibility issues before merge.
Changes
New workflow:
.github/workflows/ci.ymlwith two jobs:Security: Explicit
permissions: contents: readper principle of least privilegeTriggers: Push to
mainand pull requests targetingmainThe workflow complements the existing remote-run workflow by providing pre-merge validation.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.