Skip to content

Commit

Permalink
workflows: run examples against wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
airwoodix committed Feb 23, 2024
1 parent 6e223f6 commit c81c85c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down

0 comments on commit c81c85c

Please sign in to comment.