Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: cd aieng-topic-impl && uv sync --dev

- name: Build package
run: cd aieng-topic-impl && uv build
run: cd aieng-topic-impl && source .venv/bin/activate && uv build

- name: Publish package
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: unit tests
permissions:
contents: read
pull-requests: write

on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- .github/workflows/docs.yml
- .github/workflows/unit_tests.yml
- '**.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.
- '**.rst'
- '**.md'
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- .github/workflows/docs.yml
- .github/workflows/unit_tests.yml
- '**.py'
- '**.ipynb'
- uv.lock
- pyproject.toml
- '**.rst'
- '**.md'

jobs:
unit-tests:
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.
- name: Install uv
uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04
with:
# Install a specific version of uv.
version: "0.7.6"
enable-cache: true

- name: "Set up Python"
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
with:
python-version-file: ".python-version"

- name: Install the project
run: cd aieng-topic-impl && uv sync --all-extras --dev

- name: Install dependencies and check code
run: |
cd aieng-topic-impl
source .venv/bin/activate
uv run pytest -m "not integration_test" tests
1 change: 1 addition & 0 deletions aieng-topic-impl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## aieng-topic-impl