1818 uses : actions/setup-python@v5
1919 with :
2020 python-version : 3.12
21+ - name : Install uv
22+ run : |
23+ # https://github.com/astral-sh/uv/issues/1386#issuecomment-1947801083
24+ echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
25+ pip install uv
2126 - name : Build packages
2227 run : |
23- pip install hatch
28+ uv pip install hatch
2429 hatch build
2530 - name : Store packages
2631 uses : actions/upload-artifact@v4
5661 # there is only one wheel in dist/
5762 echo "qiskit==${{ matrix.qiskit-version }}" > override.txt
5863 uv pip install --strict --override override.txt "qiskit-aqt-provider[examples] @ $(ls dist/*.whl)"
59- - name : Checkout examples
64+ - name : Checkout examples # FIXME: ship examples with source distribution
6065 uses : actions/checkout@v4
6166 with :
6267 sparse-checkout : |
@@ -65,35 +70,48 @@ jobs:
6570 - name : Run examples
6671 run : |
6772 ./examples/run_all.sh
68- # tests:
69- # name: tests-${{ matrix.os }}-py${{ matrix.python-version }}-qiskit${{ matrix.qiskit-version }}
70- # runs-on: ${{ matrix.os }}
71- # strategy:
72- # matrix:
73- # qiskit-version: ['0.46.0', '1.0.1']
74- # python-version: ['3.12']
75- # os: ['ubuntu-latest']
76- # steps:
77- # - uses: actions/checkout@v4
78- # - name: Check shell scripts
79- 80- # - name: Lock
81- # run: poetry install --sync
82- # - name: Check version numbers consistency
83- # run: poetry run poe version_check
84- # if: startsWith(matrix.os, 'ubuntu')
85- # - name: Check formatting
86- # run: poetry run poe format_check
87- # if: startsWith(matrix.os, 'ubuntu')
88- # - name: Linting
89- # run: poetry run poe lint
90- # if: startsWith(matrix.os, 'ubuntu')
91- # - name: Type checking
92- # run: poetry run poe typecheck
93- # if: startsWith(matrix.os, 'ubuntu')
94- # - name: Testing
95- # run: poetry run poe test --cov_opts="-a" # add to examples coverage
96- # if: startsWith(matrix.os, 'ubuntu')
73+ tests :
74+ name : tests-${{ matrix.os }}-py${{ matrix.python-version }}-qiskit${{ matrix.qiskit-version }}-resolve-${{ matrix.resolution-strategy }}
75+ runs-on : ${{ matrix.os }}
76+ strategy :
77+ matrix :
78+ qiskit-version : ['1.0.1']
79+ python-version : ['3.12']
80+ os : ['ubuntu-latest']
81+ resolution-strategy : ['highest']
82+ steps :
83+ - uses : actions/checkout@v4
84+ - name : Check shell scripts
85+ 86+ - name : Setup Python ${{ matrix.python-version }}
87+ uses : actions/setup-python@v5
88+ with :
89+ python-version : ${{ matrix.python-version }}
90+ cache : " pip"
91+ - name : Install uv
92+ run : |
93+ # https://github.com/astral-sh/uv/issues/1386#issuecomment-1947801083
94+ echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
95+ pip install uv
96+ - name : Lock dependencies
97+ run : |
98+ echo "qiskit==${{ matrix.qiskit-version }}" > qiskit-override.txt
99+ echo 'furo==2023.9.10' > furo-override.txt # https://github.com/Qiskit/qiskit_sphinx_theme/issues/567
100+ uv pip compile pyproject.toml --extra development --override qiskit-override.txt --override furo-override.txt > requirements.txt
101+ - name : Install project
102+ run : |
103+ uv pip sync --strict --reinstall requirements.txt
104+ uv pip install --editable .
105+ - name : Check version numbers consistency
106+ run : poe version_check
107+ - name : Check formatting
108+ run : poe format_check
109+ - name : Linting
110+ run : poe lint
111+ - name : Type checking
112+ run : poe typecheck
113+ - name : Testing
114+ run : poe test
97115 # - name: Docs
98116 # run: poetry run poe docs
99117 # if: startsWith(matrix.os, 'ubuntu')
0 commit comments