Skip to content

Commit

Permalink
ci: propagate updates from qiskit-addon-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mrossinek committed Sep 12, 2024
1 parent 29cae4e commit 727e36b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
run: |
tox -e coverage
- name: Convert to lcov
if: always()
run: coverage3 lcov -o coveralls.lcov
- name: Upload report to Coveralls
if: always()
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/test_development_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,32 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (development versions)
- name: Determine development versions
shell: bash
run: |
python -m pip install --upgrade pip tox
python -m pip install extremal-python-dependencies==0.0.3
# 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
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-ibm-runtime @ git+https://github.com/Qiskit/qiskit-ibm-runtime.git" \
"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: Test using tox environment
shell: bash
run: |
toxpyversion=$(echo ${{ matrix.python-version }} | sed -E 's/^([0-9]+)\.([0-9]+).*$/\1\2/')
tox -epy${toxpyversion}
tox -epy${toxpyversion}-notebook
tox -edoctest
tox -e py,notebook,doctest
5 changes: 1 addition & 4 deletions .github/workflows/test_latest_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,4 @@ jobs:
- name: Test using tox environment
shell: bash
run: |
toxpyversion=$(echo ${{ matrix.python-version }} | sed -E 's/^([0-9]+)\.([0-9]+).*$/\1\2/')
tox -epy${toxpyversion}
tox -epy${toxpyversion}-notebook
tox -edoctest
tox -e py,notebook,doctest --parallel --parallel-no-spinner
5 changes: 1 addition & 4 deletions .github/workflows/test_minimum_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ jobs:
- name: Test using tox environment
shell: bash
run: |
toxpyversion=$(echo ${{ matrix.python-version }} | sed -E 's/^([0-9]+)\.([0-9]+).*$/\1\2/')
tox -epy${toxpyversion}
tox -epy${toxpyversion}-notebook
tox -edoctest
tox -e py,notebook,doctest --parallel --parallel-no-spinner
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ envlist = py{39,310,311,312}{,-notebook}, lint, coverage, docs, doctest
isolated_build = True

[testenv]
package = wheel
wheel_build_env = .pkg
parallel_show_output = True
extras =
test
commands =
Expand Down Expand Up @@ -40,12 +43,12 @@ extras =
commands =
pytest --nbmake --nbmake-timeout=3000 {posargs} docs/

[testenv:doctest]
[testenv:{,py-,py3-,py39-,py310-,py311-,py312-}doctest]
extras =
test
doctest
commands =
pytest --doctest-plus --doctest-only
pytest --doctest-plus --doctest-only {posargs}

[testenv:coverage]
basepython = python3.10
Expand Down

0 comments on commit 727e36b

Please sign in to comment.