Skip to content

Commit 1603b01

Browse files
ci: simplify package matrix - use single key instead of redundant fields
Replace matrix.include with simple list, derive path/suffix from package name. - matrix.package: [vcs-versioning, setuptools-scm] - path: ${{ matrix.package }} - suffix: -${{ matrix.package }}
1 parent fd1e2b3 commit 1603b01

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/python-tests.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ env:
2020
jobs:
2121

2222
package:
23-
name: Build & inspect ${{ matrix.name }}
23+
name: Build & inspect ${{ matrix.package }}
2424
runs-on: ubuntu-latest
2525
strategy:
2626
matrix:
27-
include:
28-
- name: vcs-versioning
29-
path: vcs-versioning
30-
suffix: -vcs-versioning
31-
- name: setuptools-scm
32-
path: setuptools-scm
33-
suffix: -setuptools-scm
27+
package:
28+
- vcs-versioning
29+
- setuptools-scm
3430
env:
3531
# Use no-local-version for package builds to ensure clean versions for PyPI uploads
3632
SETUPTOOLS_SCM_NO_LOCAL: "1"
@@ -40,11 +36,11 @@ jobs:
4036
with:
4137
fetch-depth: 0
4238

43-
- name: Build ${{ matrix.name }}
39+
- name: Build ${{ matrix.package }}
4440
uses: hynek/build-and-inspect-python-package@v2
4541
with:
46-
path: ${{ matrix.path }}
47-
upload-name-suffix: ${{ matrix.suffix }}
42+
path: ${{ matrix.package }}
43+
upload-name-suffix: -${{ matrix.package }}
4844

4945
test:
5046
needs: [package]

0 commit comments

Comments
 (0)