Skip to content

Commit e0d3417

Browse files
committed
Revert "Test installation along with build"
This reverts commit cd2432b.
1 parent aa437f1 commit e0d3417

File tree

1 file changed

+64
-15
lines changed

1 file changed

+64
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 64 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,32 +108,81 @@ jobs:
108108
- name: Build the source and binary distribution
109109
run: python -m build
110110

111-
- name: Test installing wheel
112-
shell: bash
113-
run: |
114-
python --version
115-
python -m pip install dist/*.whl
116-
117111
- name: Upload distribution files
118112
uses: actions/upload-artifact@v5
119113
with:
120114
name: dist-packages-${{ matrix.target }}-${{ matrix.python }}
121115
path: dist/
122116
if-no-files-found: error
123117

124-
# This job runs if all the `build` matrix jobs ran and succeeded.
118+
test-installation:
119+
name: Test package installation
120+
needs: ["build"]
121+
strategy:
122+
fail-fast: false
123+
matrix:
124+
platform:
125+
- target: ubuntu-24.04
126+
- target: ubuntu-24.04-arm
127+
- target: windows-latest
128+
- target: macos-15-intel
129+
- target: macos-15
130+
python:
131+
- "3.11"
132+
- "3.12"
133+
- "3.13"
134+
- "3.14"
135+
runs-on: ${{ matrix.target }}
136+
137+
steps:
138+
- name: Setup Git
139+
uses: frequenz-floss/[email protected]
140+
141+
- name: Print environment (debug)
142+
run: env
143+
144+
- name: Download package
145+
uses: actions/download-artifact@v6
146+
with:
147+
name: dist-packages-${{ matrix.platform.target }}-${{ matrix.python }}
148+
path: dist
149+
150+
# This is necessary for the `pip` caching in the setup-python action to work
151+
- name: Fetch the pyproject.toml file for this action hash
152+
env:
153+
GH_TOKEN: ${{ github.token }}
154+
REPO: ${{ github.repository }}
155+
REF: ${{ github.sha }}
156+
run: |
157+
set -ux
158+
gh api \
159+
-X GET \
160+
-H "Accept: application/vnd.github.raw" \
161+
"/repos/$REPO/contents/pyproject.toml?ref=$REF" \
162+
> pyproject.toml
163+
164+
- name: Setup Python
165+
uses: frequenz-floss/[email protected]
166+
with:
167+
python-version: ${{ matrix.python }}
168+
dependencies: dist/*.whl
169+
170+
- name: Print installed packages (debug)
171+
run: python -m pip freeze
172+
173+
# This job runs if all the `test-installation` matrix jobs ran and succeeded.
125174
# It is only used to have a single job that we can require in branch
126175
# protection rules, so we don't have to update the protection rules each time
127176
# we add or remove a job from the matrix.
128-
build-all:
129-
# The job name should match the name of the `build` job.
130-
name: Build distribution packages
131-
needs: ["build"]
132-
# We skip this job only if build was also skipped
133-
if: always() && needs.build.result != 'skipped'
177+
test-installation-all:
178+
# The job name should match the name of the `test-installation` job.
179+
name: Test package installation
180+
needs: ["test-installation"]
181+
# We skip this job only if test-installation was also skipped
182+
if: always() && needs.test-installation.result != 'skipped'
134183
runs-on: ubuntu-24.04
135184
env:
136-
DEPS_RESULT: ${{ needs.build.result }}
185+
DEPS_RESULT: ${{ needs.test-installation.result }}
137186
steps:
138187
- name: Check matrix job result
139188
run: test "$DEPS_RESULT" = "success"
@@ -173,7 +222,7 @@ jobs:
173222

174223
publish-docs:
175224
name: Publish documentation website to GitHub pages
176-
needs: ["nox-all", "build-all"]
225+
needs: ["nox-all", "test-installation-all"]
177226
if: github.event_name == 'push'
178227
runs-on: ubuntu-24.04
179228
permissions:

0 commit comments

Comments
 (0)