diff --git a/.github/actions/setup-uv/action.yml b/.github/actions/setup-uv/action.yml index 309716e3d..078bccb5a 100644 --- a/.github/actions/setup-uv/action.yml +++ b/.github/actions/setup-uv/action.yml @@ -1,6 +1,14 @@ name: Set up uv description: Install the pinned version of uv and cache its package cache - +inputs: + enable-cache: + description: Enable cache + required: false + type: boolean + python-version: + description: Python version + required: false + type: string runs: using: composite steps: @@ -8,10 +16,18 @@ runs: shell: bash run: pip install -r .github/uv-requirements.txt + - name: Pin Python version ${{ inputs.python-version }} + if: ${{ inputs.python-version != '' }} + shell: bash + run: uv python pin "$PYTHON_VERSION" + env: + PYTHON_VERSION: ${{ inputs.python-version }} + - name: Cache uv packages + if: ${{ inputs.enable-cache == 'true' }} uses: actions/cache@v4 with: path: ~/.cache/uv key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} restore-keys: | - uv-${{ runner.os }}- \ No newline at end of file + uv-${{ runner.os }}- diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index a40d377cd..f80fc2f95 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -12,9 +12,7 @@ concurrency: cancel-in-progress: true env: - # We stick to Python 3.13 since qiskit-aer is not available yet for Python 3.14. - # See https://github.com/Qiskit/qiskit-aer/issues/2378. - python-version: "3.13" + python-version: "3.14" jobs: mypy-pyright: @@ -67,4 +65,4 @@ jobs: run: | cd ${{ runner.temp }} echo "from graphix import Pattern" > test_graphix_type.py - uv run --project ${{ github.workspace }} --no-sync mypy test_graphix_type.py \ No newline at end of file + uv run --project ${{ github.workspace }} --no-sync mypy test_graphix_type.py