diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f32468e..e850639 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,9 +18,9 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v7 with: - version: "latest" + enable-cache: true - name: Set up Python 3.13 run: uv python install 3.13 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d593661..859ac0b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,10 @@ jobs: with: python-version: '3.12' - - uses: astral-sh/setup-uv@v3 + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true - name: Generate docs (pdoc + mkdocs) run: | diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 4d1362e..1144bea 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -9,47 +9,32 @@ permissions: contents: read jobs: - build: - name: Build distribution 📦 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install pypa/build - run: >- - python3 -m - pip install - uv - - name: Build a binary wheel and a source tarball - run: uv build --sdist --wheel --out-dir dist - - name: Store the distribution packages - uses: actions/upload-artifact@v4 - with: - name: python-package-distributions - path: dist/ - publish-to-pypi: name: Publish Python 🐍 distribution 📦 to PyPI - needs: - - build runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/confkit permissions: id-token: write # IMPORTANT: mandatory for trusted publishing + contents: read steps: - - name: Download all the dists - uses: actions/download-artifact@v4 + - name: Checkout + uses: actions/checkout@v4 with: - name: python-package-distributions - path: dist/ + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Set up Python + run: uv python install 3.14 + + - name: Build distribution 📦 + run: uv build + - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + run: uv publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7aa9866..2c0e581 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,27 +34,21 @@ jobs: ${{ runner.os }}-pytest-${{ matrix.python-version }}- - name: Install uv - if: steps.cache-pytest.outputs.cache-hit != 'true' - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v7 with: - version: "latest" + enable-cache: true - name: Set up Python ${{ matrix.python-version }} - if: steps.cache-pytest.outputs.cache-hit != 'true' run: uv python install ${{ matrix.python-version }} - name: Install dependencies - if: steps.cache-pytest.outputs.cache-hit != 'true' run: uv sync --group dev - name: Run tests - if: steps.cache-pytest.outputs.cache-hit != 'true' run: uv run pytest . - name: Run ruff check - if: steps.cache-pytest.outputs.cache-hit != 'true' run: uv run ruff check . - name: Run type checking - if: steps.cache-pytest.outputs.cache-hit != 'true' run: uvx ty check . --ignore no-matching-overload