diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a9ba1c0..cea98c6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 0000000..adfbe3b --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -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 + - '**.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/checkout@v4.2.2 + + - 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 diff --git a/aieng-topic-impl/README.md b/aieng-topic-impl/README.md new file mode 100644 index 0000000..a14cda4 --- /dev/null +++ b/aieng-topic-impl/README.md @@ -0,0 +1 @@ +## aieng-topic-impl