Skip to content

Commit fadc989

Browse files
authored
Fix wheel build test (#426)
This PR - changes the pypi.yml action to use python 3.10 since 3.8 was breaking on the runner for unclear reasons - updates the actions versions used for git checkout and setup-python too to those used successfully in [tsdat](https://github.com/tsdat/tsdat/blob/main/.github/workflows/pypi-release.yml)
1 parent 77b133c commit fadc989

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/pypi.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
push:
88
branches:
99
- main
10+
pull_request:
11+
branches:
12+
- main
1013
release:
1114
types: [published]
1215

@@ -16,13 +19,13 @@ jobs:
1619
runs-on: ubuntu-latest
1720

1821
steps:
19-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2023
with:
2124
fetch-depth: 0
2225

23-
- uses: actions/setup-python@v2
26+
- uses: actions/setup-python@v5
2427
with:
25-
python-version: 3.8
28+
python-version: '3.10'
2629

2730
- run: python -m pip install build --user
2831
- run: python -m build --sdist --wheel --outdir dist/ .
@@ -36,8 +39,8 @@ jobs:
3639
pip install 'mhkit[all]' --find-links dist/
3740
python -c "from mhkit import wave, river, tidal, dolfyn, power, loads, mooring, acoustics, qc, utils; print('All modules imported successfully')"
3841
39-
- name: Upload to Test PyPI
40-
if: github.event_name != 'release' && github.repository_owner == 'MHKiT-Software'
42+
- name: Upload to Test PyPI (commits to main only)
43+
if: github.event_name == 'push' && github.repository_owner == 'MHKiT-Software'
4144
uses: pypa/gh-action-pypi-publish@release/v1
4245
with:
4346
user: __token__

.github/workflows/test-wheel-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: ['3.10', '3.11', '3.12']
19+
python-version: ['3.11', '3.12']
2020

2121
steps:
2222
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)