Skip to content

Commit badc546

Browse files
committed
ci: also run tests
1 parent e518570 commit badc546

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
python-version: "3.11"
1919
- name: 🏗 Install build dependencies
2020
run: |
21-
python -m pip install wheel --user
21+
python -m pip install build --user
2222
- name: 🔨 Build a binary wheel and a source tarball
2323
run: |
24-
python setup.py sdist bdist_wheel
24+
python -m build
2525
- name: ⬆ Upload build result
2626
uses: actions/upload-artifact@v4
2727
with:
@@ -39,17 +39,34 @@ jobs:
3939
python-version: "3.11"
4040
- name: 🏗 Set up dev dependencies
4141
run: |
42-
pip install pre-commit
42+
pip install -r requirements-dev.txt
4343
- name: 🚀 Run pre-commit
4444
run: |
4545
pre-commit run --all-files --show-diff-on-failure
4646
47+
test:
48+
name: 🧪 Run tests
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v3
52+
- name: 🏗 Set up Python 3.11
53+
uses: actions/setup-python@v4
54+
with:
55+
python-version: "3.11"
56+
- name: 🏗 Set up dev dependencies
57+
run: |
58+
pip install -r requirements-dev.txt
59+
- name: 🚀 Run pytest
60+
run: |
61+
pytest
62+
4763
publish-on-pypi:
4864
name: 📦 Publish tagged releases to PyPI
4965
if: github.event_name == 'release' && github.repository == 'OctoPrint/mkdocs-site-urls'
5066
needs:
5167
- build
5268
- pre-commit
69+
- test
5370
runs-on: ubuntu-latest
5471
environment: release
5572
permissions:

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
mkdocs>=1.5.0
12
pre-commit
23
pytest
34
-e .

0 commit comments

Comments
 (0)