From 65b4f5935052326afd74ab7b5ee6832397d72570 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 21 Dec 2024 11:32:36 +0100 Subject: [PATCH 1/2] migrate to hynek/build-and-inspect-python-package for packaging and testing --- .github/workflows/main.yml | 44 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b52229e4..bc014617 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,17 @@ on: - main jobs: - build: + check-package: + name: Build & inspect our package. + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: hynek/build-and-inspect-python-package@v2 + test: + needs: [check-package] runs-on: ${{ matrix.os }} strategy: @@ -87,9 +97,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Download built packages from the check-package job. + uses: actions/download-artifact@v4 with: - fetch-depth: 0 - + name: Packages + path: dist - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v5 with: @@ -103,11 +115,13 @@ jobs: - name: Test without coverage if: "! matrix.use_coverage" - run: "tox -e ${{ matrix.tox_env }}" + shell: bash + run: "tox run -e ${{ matrix.tox_env }} --installpkg dist/*.whl" - name: Test with coverage if: "matrix.use_coverage" - run: "tox -e ${{ matrix.tox_env }}-coverage" + shell: bash + run: "tox run -e ${{ matrix.tox_env }}-coverage --installpkg dist/*.whl" - name: Upload coverage if: matrix.use_coverage && github.repository == 'pytest-dev/pluggy' @@ -119,27 +133,17 @@ jobs: verbose: true deploy: + needs: [check-package] if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pluggy' runs-on: ubuntu-latest permissions: id-token: write steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-python@v5 + - name: Download built packages from the check-package job. + uses: actions/download-artifact@v4 with: - python-version: "3.x" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install --upgrade build - - - name: Build package - run: python -m build --sdist --wheel --outdir dist/ - + name: Packages + path: dist - name: Publish package uses: pypa/gh-action-pypi-publish@v1.12.4 with: From 42fc7f2087e243fe1569b5ba19589482368d4512 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 21 Dec 2024 11:44:05 +0100 Subject: [PATCH 2/2] update project authors/maintainers --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3baa556c..a4669d34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] requires = [ - # sync with setup.py until we discard non-pep-517/518 "setuptools>=65.0", "setuptools-scm[toml]>=8.0", ] @@ -9,7 +8,8 @@ build-backend = "setuptools.build_meta" [project] name = "pluggy" license = {text = "MIT"} -authors = [{name = "Holger Krekel", email = "holger@merlinux.eu"}] +authors = [{name = "Holger Krekel"}] +maintainers = [{name="pytest core team", email="core@pytest.org"}] classifiers = [ "Development Status :: 6 - Mature", "Intended Audience :: Developers",