Skip to content

Commit 30a90e2

Browse files
committed
CI: Test if we can build puppetboard
In our normal test pipeline, we didn't verify if we can properly build the package. because of that, the last 6.0.0 release failed: ``` Run python setup.py build sdist bdist_wheel Traceback (most recent call last): File "/home/runner/work/puppetboard/puppetboard/setup.py", line 3, in <module> from setuptools.command.test import test as TestCommand ModuleNotFoundError: No module named 'setuptools' ```
1 parent 2f21617 commit 30a90e2

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
with:
1818
python-version: 3.12
1919
- name: Install dependencies
20-
run: |
21-
pip install wheel
20+
run: pip install wheel
2221
- name: Build
23-
run: |
24-
python setup.py build sdist bdist_wheel
22+
run: python setup.py build sdist bdist_wheel
2523
- name: Publish distribution 📦 to PyPI
2624
uses: pypa/[email protected]
2725
with:

.github/workflows/tests.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
strategy:
15-
max-parallel: 5
1615
matrix:
1716
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
1817

@@ -38,6 +37,23 @@ jobs:
3837
token: ${{ secrets.CODECOV_TOKEN }}
3938
fail_ci_if_error: true
4039

40+
# this uses the same commands as in our release pipeline and ensures that we can still build puppetboard
41+
test-build:
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
- name: Install dependencies
53+
run: pip install wheel
54+
- name: Build
55+
run: python setup.py build sdist bdist_wheel
56+
4157
build_docker_image:
4258
name: 'Test building a container'
4359
runs-on: ubuntu-latest
@@ -70,6 +86,7 @@ jobs:
7086
tests:
7187
needs:
7288
- test
89+
- test-build
7390
- build_docker_image
7491
- security-tests
7592
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)