diff --git a/.github/workflows/pip-install.yml b/.github/workflows/pip-install.yml index eff6bf9..ce14075 100644 --- a/.github/workflows/pip-install.yml +++ b/.github/workflows/pip-install.yml @@ -8,12 +8,8 @@ on: jobs: build: - name: 'py${{ matrix.python }} on ${{ matrix.os }}' - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04] - python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + name: Build distribution + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: @@ -23,14 +19,38 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: ${{ matrix.python }} - allow-prereleases: true + python-version: '3.11' - name: Build run: | python -m pip install -U pip build twine setuptools setuptools_scm wheel python -m build + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/* + + test: + name: 'Test py${{ matrix.python }} on ${{ matrix.os }}' + needs: [build] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04] + python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist + + - uses: actions/setup-python@v5 + name: Install Python + with: + python-version: ${{ matrix.python }} + allow-prereleases: true + - name: Test the sdist run: | python -m venv venv-sdist @@ -43,13 +63,8 @@ jobs: venv-wheel/bin/python -m pip install dist/vspace*.whl venv-wheel/bin/python -c "import vspace; print(vspace.__version__)" - - uses: actions/upload-artifact@v4 - with: - name: dist-${{ matrix.os }}-${{ matrix.python }} - path: dist/* - upload_pypi: - needs: [build] + needs: [build, test] runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' permissions: @@ -57,8 +72,7 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - pattern: dist-* + name: dist path: dist - merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b49c356..2c280fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-latest] + os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-26] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: