Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix development version tests #38

Merged
merged 1 commit into from
Nov 8, 2024
Merged
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
54 changes: 31 additions & 23 deletions .github/workflows/test_development_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,39 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Determine development versions
shell: bash
run: |
# NOTE: by determining the current git commit SHAs, we can ensure that
# the individually run tox environments indeed actually use the exact
# same versions (which may not be the case if at the exact time a new
# commit gets added to the respective repositories).
# Additionally, using these commit SHAs ensures that the locally built
# Python wheels get cached, ensuring a faster tox environment setup
# for the multiple jobs below.
QISKIT_SHA=$(git ls-remote "https://github.com/Qiskit/qiskit" | grep HEAD | awk '{print $1}')
echo "QISKIT_SHA=$QISKIT_SHA" >> "$GITHUB_ENV"
echo "Using Qiskit/qiskit @ $QISKIT_SHA"
QISKIT_IBM_RUNTIME_SHA=$(git ls-remote "https://github.com/Qiskit/qiskit-ibm-runtime" | grep HEAD | awk '{print $1}')
echo "QISKIT_IBM_RUNTIME_SHA=$QISKIT_IBM_RUNTIME_SHA" >> "$GITHUB_ENV"
echo "Using Qiskit/qiskit-ibm-runtime @ $QISKIT_IBM_RUNTIME_SHA"
- name: Pinning development versions
shell: bash
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install tox extremal-python-dependencies==0.0.3
extremal-python-dependencies pin-dependencies \
"qiskit @ git+https://github.com/Qiskit/qiskit.git@$QISKIT_SHA" \
"qiskit-ibm-runtime @ git+https://github.com/Qiskit/qiskit-ibm-runtime.git@$QISKIT_IBM_RUNTIME_SHA" \
--inplace
- name: Install tools from pypi
run: |
python -m pip install tox build extremal-python-dependencies==0.0.3
- name: Build Qiskit SDK development wheel
run: |
git clone https://github.com/Qiskit/qiskit
cd qiskit
git rev-parse HEAD
python -m build --wheel
- name: Build qiskit-ibm-runtime development wheel
run: |
git clone https://github.com/Qiskit/qiskit-ibm-runtime
cd qiskit-ibm-runtime
git rev-parse HEAD
python -m build --wheel
- name: Build qiskit-addon-utils development wheel
run: |
git clone https://github.com/Qiskit/qiskit-addon-utils
cd qiskit-addon-utils
git rev-parse HEAD
# Unpin qiskit<2
extremal-python-dependencies pin-dependencies --inplace qiskit
python -m build --wheel
- name: Pin development versions
shell: bash
run: >-
extremal-python-dependencies pin-dependencies --inplace
"qiskit @ file:$(echo qiskit/dist/*.whl)"
"qiskit-ibm-runtime @ file:$(echo qiskit-ibm-runtime/dist/*.whl)"
"qiskit-addon-utils @ file:$(echo qiskit-addon-utils/dist/*.whl)"
- name: Test using tox environment
shell: bash
run: |
Expand Down
Loading