Skip to content

Commit e2b15ed

Browse files
author
Jelmer Bot
committed
Only sdist with testing
1 parent 9a82c4e commit e2b15ed

File tree

6 files changed

+26
-28
lines changed

6 files changed

+26
-28
lines changed

.github/workflows/Publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727

2828
- name: Install dependencies
2929
run: |
30-
pip install -U wheelhouse_uploader pyyaml
30+
pip install -U pyyaml
3131
32-
- name: Download wheels and sdist
32+
- name: Download sdist
3333
uses: dawidd6/[email protected]
3434
with:
3535
github_token: ${{ secrets.PUSH_TOKEN }}
36-
workflow: Wheels.yml
36+
workflow: Tests.yml
3737
workflow_conclusion: success
3838
branch: main
3939
path: .
@@ -42,7 +42,6 @@ jobs:
4242
run: |
4343
mkdir dist
4444
mv sdist/* dist/
45-
mv wheels/* dist/
4645
4746
- name: Publish package to (Test)PyPI
4847
uses: pypa/[email protected]

.github/workflows/Tests.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ jobs:
5656
path: dist/*.tar.gz
5757
if-no-files-found: error
5858

59-
build_wheels:
60-
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
59+
test_sdist:
60+
name: Test sdist for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
6161
needs: build_sdist
6262
runs-on: ${{ matrix.os }}
6363
strategy:
64-
fail-fast: false
64+
fail-fast: true
6565
matrix:
6666
include:
6767
- os: windows-latest
@@ -108,26 +108,16 @@ jobs:
108108
- name: Setup Python
109109
uses: actions/setup-python@v4
110110
with:
111-
python-version: '3.9' # update once build dependencies are available
112-
113-
- name: Build and Test wheels
114-
uses: pypa/cibuildwheel@51f5c7fe68ff24694d5a6ac0eb3ad476ddd062a8 # v2.13.0
115-
with:
116-
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
117-
env:
118-
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
119-
CIBW_ARCHS: all
120-
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
121-
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
122-
CIBW_TEST_REQUIRES: pytest matplotlib pandas networkx
123-
CIBW_TEST_COMMAND: pytest {package}/tests
124-
CIBW_BUILD_VERBOSITY: 1
111+
python-version: ${{ matrix.python }}
112+
cache: 'pip'
125113

126-
- name: Store artifacts
127-
uses: actions/upload-artifact@v3
128-
with:
129-
name: wheels
130-
path: wheelhouse/*.whl
131-
if-no-files-found: ignore
114+
- name: Install dependencies
115+
run: |
116+
python -m pip install --upgrade pip
117+
pip install pytest
132118
119+
- name: Run tests
120+
run: |
121+
pip install dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
122+
python -c "from multi_mst.tests import run_tests; run_tests()"
133123

multi_mst/tests/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import os
2+
import pytest
3+
4+
def run_tests():
5+
pytest.main([os.sep.join(__file__.split(os.sep)[:-1])])
File renamed without changes.
File renamed without changes.

setup.cfg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ classifiers =
2121

2222
[options]
2323
zip_safe = False
24-
packages = multi_mst
24+
packages =
25+
multi_mst
26+
multi_mst.k_mst
27+
multi_mst.noisy_mst
28+
multi_mst.tests
2529
python_requires = >=3.9
2630
install_requires =
2731
numpy>=1.21

0 commit comments

Comments
 (0)