-
Notifications
You must be signed in to change notification settings - Fork 0
Add unit test workflow #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new GitHub Actions workflow for running unit tests and updates the publish workflow to activate the virtual environment before building.
- Introduce
.github/workflows/unit_tests.ymlto install dependencies viauvand runpytest(excluding integration tests). - Update
.github/workflows/publish.ymlbuild step to source the virtual environment beforeuv build.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/unit_tests.yml | New workflow defining triggers, environment setup, and test execution |
| .github/workflows/publish.yml | Modified build step to activate .venv prior to packaging |
Comments suppressed due to low confidence (1)
.github/workflows/unit_tests.yml:57
- [nitpick] The step name 'Install dependencies and check code' suggests only setup; it actually runs pytest. Consider renaming it to 'Run unit tests' for clarity.
- name: Install dependencies and check code
| - '**.py' | ||
| - '**.ipynb' | ||
| - uv.lock | ||
| - pyproject.toml |
Copilot
AI
May 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow triggers on documentation files (e.g., '*.rst'), causing tests to run on docs-only changes. Use paths-ignore for docs or restrict triggers to code files to avoid unnecessary runs.
| - pyproject.toml | |
| - pyproject.toml | |
| paths-ignore: |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/[email protected] | ||
|
|
Copilot
AI
May 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding actions/cache after checkout to cache dependencies (e.g., .venv or pip cache) and speed up subsequent job runs.
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| aieng-topic-impl/.venv | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- |
PR Type
Github action workflow
Short Description
...
Tests Added
...