Skip to content

Commit

Permalink
Fix development version tests (#38)
Browse files Browse the repository at this point in the history
Propagation of Qiskit/qiskit-addon-mpf#31
to here.

(cherry picked from commit 2412cb2)
  • Loading branch information
garrison authored and mergify[bot] committed Nov 8, 2024
1 parent f0e337a commit c307853
Showing 1 changed file with 31 additions and 23 deletions.
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

0 comments on commit c307853

Please sign in to comment.