Skip to content

Conversation

@amrit110
Copy link
Member

@amrit110 amrit110 commented May 22, 2025

PR Type

Github action workflow

Short Description

...

Tests Added

...

@amrit110 amrit110 requested a review from Copilot May 22, 2025 17:00
@amrit110 amrit110 self-assigned this May 22, 2025
@amrit110 amrit110 added the github_actions Pull requests that update GitHub Actions code label May 22, 2025
Copy link
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

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.yml to install dependencies via uv and run pytest (excluding integration tests).
  • Update .github/workflows/publish.yml build step to source the virtual environment before uv 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
Copy link

Copilot AI May 22, 2025

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.

Suggested change
- pyproject.toml
- pyproject.toml
paths-ignore:

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

Copy link

Copilot AI May 22, 2025

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.

Suggested change
- 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-

Copilot uses AI. Check for mistakes.
@amrit110 amrit110 merged commit 6ef808c into main May 22, 2025
1 check passed
@amrit110 amrit110 deleted the add_unit_test_workflow branch May 22, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants