diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 8b856f5a..20c78ab8 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -13,21 +13,30 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - name: Checkout project + id: checkout + uses: actions/checkout@v5 - name: Set up Python 3.13 - uses: actions/setup-python@v6 id: setup-python + uses: actions/setup-python@v6 with: python-version: "3.13" architecture: x64 + - name: Install uv + id: setup-uv + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + - name: Install tox + id: install-tox run: | - python -m pip install --upgrade pip - python -m pip install tox tox-uv uv + uv pip install --system tox tox-uv - name: Run benchmarks with CodSpeed + id: run-benchmarks uses: CodSpeedHQ/action@v4 with: mode: instrumentation diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 21f92db5..61fd1761 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,19 +8,29 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - name: Checkout project + id: checkout + uses: actions/checkout@v5 - name: Set up Python 3.13 + id: setup-python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: "3.13" + + - name: Install uv + id: setup-uv + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true - name: Install tox + id: install-tox run: | - python -m pip install --upgrade pip - python -m pip install tox uv tox-uv + uv pip install --system tox tox-uv - name: Run code quality tests with tox + id: lint run: tox env: TOXENV: ruff,mypy,docs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bee561ff..819fe1e4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,19 +11,28 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - name: Checkout project + id: checkout + uses: actions/checkout@v5 - name: Set up Python 3.13 + id: setup-python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: "3.13" + + - name: Install uv + id: setup-uv + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + + - name: Build wheel and source tarball with uv + id: build + run: uv build - - name: Build wheel and source tarball with uv_build - run: | - python -m pip install --upgrade pip - python -m pip install uv_build - python -m uv_build build - name: Publish a Python distribution to PyPI + id: publish uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6ddbbca..41dc6727 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,18 +12,29 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.9', 'pypy3.10'] steps: - - uses: actions/checkout@v5 + - name: Checkout project + id: checkout + uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} + id: setup-python uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} + - name: Install uv + id: setup-uv + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + - name: Install tox and plugins + id: install-tox run: | - python -m pip install tox tox-gh-actions tox-uv uv + uv pip install --system tox tox-uv tox-gh-actions - name: Run unit tests with tox + id: test run: tox tests-old: @@ -35,23 +46,35 @@ jobs: python-version: ['3.7', '3.8'] steps: - - uses: actions/checkout@v5 + - name: Checkout project + id: checkout + uses: actions/checkout@v5 - name: Set up Python 3.13 (tox runner) + id: setup-python uses: actions/setup-python@v6 with: python-version: '3.13' - - name: Install tox and plugins (with Python 3.13) + - name: Install uv + id: setup-uv + uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + + - name: Install tox and plugins + id: install-tox run: | - python3.13 -m pip install tox tox-gh-actions tox-uv uv + uv pip install --system tox tox-uv tox-gh-actions - name: Set up target Python ${{ matrix.python-version }} + id: setup-target-python uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Run unit tests with tox for target + id: test shell: bash run: | ENV="py${{ matrix.python-version }}"; ENV=${ENV/./}