From c81c85ca6f79a87aa5a8ad3f87479c186cd2d618 Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Fri, 23 Feb 2024 14:40:02 +0100 Subject: [PATCH] workflows: run examples against wheel --- .github/workflows/tests.yml | 24 ++++++++++++------------ pyproject.toml | 2 ++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5bb1301..45b4b40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,23 +31,23 @@ jobs: # https://github.com/astral-sh/uv/issues/1386#issuecomment-1947801083 echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV pip install uv - - name: Lock dependencies + - name: Build package run: | - echo "qiskit==${{ matrix.qiskit-version }}" > overrides.txt - uv pip compile pyproject.toml --extra examples --override overrides.txt > requirements.txt - - name: Install dependencies - run: | - uv pip sync --strict --reinstall requirements.txt - uv pip install coverage[toml] - - name: Archive dependencies specification + uv pip install hatch + hatch build + - name: Store build packages uses: actions/upload-artifact@v4 with: - name: locked-dependencies - path: requirements.txt - retention-days: 7 + name: packages + path: dist/* + - name: Install package wheel + run: | + cp dist/*.whl qiskit_aqt_provider.whl # fixed name + uv pip install --strict 'qiskit-aqt-provider[examples] @ qiskit_aqt_provider.whl' + rm -f qiskit_aqt_provider.whl - name: Run examples (linux) run: | - ./examples/run_all.sh -c + ./examples/run_all.sh # - name: Lock # run: poetry install --sync # - name: Check version numbers consistency diff --git a/pyproject.toml b/pyproject.toml index 2d91e76..f8601b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,6 +96,8 @@ aqt = "qiskit_aqt_provider.transpiler_plugin:AQTTranslationPlugin" [tool.hatch.build.targets.sdist] packages = [ "qiskit_aqt_provider", + # FIXME: put examples and test(s) in qiskit_aqt_provider package + "examples", "test", ]