Conversation
This workflow file defines multiple jobs for testing a Python package across different operating systems and Python versions, including building the package and running tests using pytest.
There was a problem hiding this comment.
Pull request overview
Adds a new “full” GitHub Actions workflow that runs pytest across a broad OS/Python matrix, and lightly renames steps in the existing “simple” workflow.
Changes:
- Renamed a couple of steps in
test_simple.yaml(step name text only). - Added
test_full.yamlworkflow to build wheels, install, and run pytest on multiple OS/Python versions. - Uploads built wheels as artifacts per matrix entry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/test_simple.yaml | Step name text updates (no functional CI changes). |
| .github/workflows/test_full.yaml | New workflow to build/install package and run pytest across OS/Python matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: 👷 Test build from source ⚒️ | ||
| run: python -m build --wheel | ||
| - name: 👩💻 Test install from GitHub 🌐 | ||
| run: pip install git+https://github.com/gatagat/lap.git | ||
| - name: 🧪 Run full tests with pytest 👨⚖️ | ||
| run: | | ||
| pip install -U pytest pytest-timeout numpy scipy | ||
| pytest -v --pyargs lap.tests |
There was a problem hiding this comment.
This workflow checks out the PR code and builds a wheel from the local workspace, but then installs lap from the default branch on GitHub (gatagat/lap.git) before running tests. That means the pytest run can execute against upstream code rather than the code under test. Prefer installing the locally built wheel (e.g., from dist/*.whl) or installing the checked-out source (pip install .). If you truly want to install from git, pin the install to the current ref/sha (and repository) so the tests match the checked-out code.
| - name: 👩💻 Test install from GitHub 🌐 | ||
| run: pip install git+https://github.com/gatagat/lap.git |
There was a problem hiding this comment.
The install URL is hard-coded to gatagat/lap, which will be wrong when this workflow runs in forks or other repositories. Use the current repository context (e.g., ${{ github.repository }}) or avoid a git URL entirely by installing from the checked-out workspace / built artifact so CI validates the correct code.
| - name: Prepare for build | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install "setuptools>=67.8.0" | ||
| pip install wheel build | ||
| - name: 👷 Test build from source ⚒️ | ||
| run: python -m build --wheel |
There was a problem hiding this comment.
The same 'Prepare for build' + build-wheel step sequence is duplicated across all three jobs. Consider extracting these into a reusable workflow (workflow_call) or a composite action to keep the workflow DRY and make future edits (e.g., tool versions, build flags) less error-prone.
No description provided.