Skip to content

Commit

Permalink
CI: Test if we can build puppetboard
Browse files Browse the repository at this point in the history
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'
```
  • Loading branch information
bastelfreak committed Nov 26, 2024
1 parent 2f21617 commit ea16637
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install wheel
run: pip install wheel
- name: Build
run: |
python setup.py build sdist bdist_wheel
run: python setup.py build sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
with:
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
runs-on: ubuntu-latest

strategy:
max-parallel: 5
matrix:
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]

Expand All @@ -37,6 +36,25 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Build
run: python setup.py build sdist bdist_wheel

# this uses the same commands as in our release pipeline and ensures that we can still build puppetboard
test-build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }
- name: Install dependencies
run: pip install wheel
- name: Build
run: python setup.py build sdist bdist_wheel

build_docker_image:
name: 'Test building a container'
Expand Down

0 comments on commit ea16637

Please sign in to comment.