@@ -206,7 +206,7 @@ jobs:
206206 name : Publish to PyPI
207207 runs-on : ubuntu-latest
208208 if : ${{ startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
209- needs : [linux, macos, sdist]
209+ needs : [linux, macos, sdist, tests, docs ]
210210 steps :
211211 - uses : actions/download-artifact@v4
212212 with :
@@ -227,57 +227,57 @@ jobs:
227227 ls
228228 twine upload wheelhouse/*.whl --skip-existing
229229
230- # build_wheel_dev:
231- # name: Build wheel for documentation and tests
232- # runs-on: ubuntu-latest
233- # outputs:
234- # filename: ${{ steps.get_filename.outputs.file_name }}
235- # steps:
236- # - uses: actions/checkout@v4
237- # - uses: actions/setup-python@v5
238- # with:
239- # python-version: 3.x
240- # - name: Build wheels
241- # uses: PyO3/maturin-action@v1
242- # with:
243- # target: x86_64
244- # args: --release --out dist -m pysplashsurf/Cargo.toml
245- # manylinux: auto
246- # - name: Get wheel name
247- # id: get_filename
248- # run: |
249- # FILE_NAME=$(ls dist)
250- # echo "file_name=$FILE_NAME" >> $GITHUB_OUTPUT
251- # - name: Upload wheel
252- # uses: actions/upload-artifact@v4
253- # with:
254- # name: doc_tests_wheel
255- # path: dist
230+ build_wheel_dev :
231+ name : Build wheel for documentation and tests
232+ runs-on : ubuntu-latest
233+ outputs :
234+ filename : ${{ steps.get_filename.outputs.file_name }}
235+ steps :
236+ - uses : actions/checkout@v4
237+ - uses : actions/setup-python@v5
238+ with :
239+ python-version : 3.x
240+ - name : Build wheels
241+ uses : PyO3/maturin-action@v1
242+ with :
243+ target : x86_64
244+ args : --release --out dist -m pysplashsurf/Cargo.toml
245+ manylinux : auto
246+ - name : Get wheel name
247+ id : get_filename
248+ run : |
249+ FILE_NAME=$(ls dist)
250+ echo "file_name=$FILE_NAME" >> $GITHUB_OUTPUT
251+ - name : Upload wheel
252+ uses : actions/upload-artifact@v4
253+ with :
254+ name : doc_tests_wheel
255+ path : dist
256256
257- # docs:
258- # name: Build documentation
259- # needs: build_wheel_dev
260- # runs-on: ubuntu-latest
261- # steps:
262- # - uses: actions/checkout@v4
263- # - uses: actions/setup-python@v5
264- # with:
265- # python-version: 3.x
266- # - name: Download wheel
267- # uses: actions/download-artifact@v4
268- # with:
269- # name: doc_tests_wheel
270- # path: dist/
271- # - name: Append output to file
272- # run: |
273- # echo "./dist/${{ needs.build_wheel_dev.outputs.filename }}" >> pysplashsurf/pysplashsurf/docs/requirements.txt
274- # - uses: ammaraskar/[email protected] 275- # with:
276- # docs-folder: "pysplashsurf/pysplashsurf/docs/"
277- # - uses: actions/upload-artifact@v4
278- # with:
279- # name: DocumentationHTML
280- # path: pysplashsurf/pysplashsurf/docs/build/html/
257+ docs :
258+ name : Build documentation
259+ needs : build_wheel_dev
260+ runs-on : ubuntu-latest
261+ steps :
262+ - uses : actions/checkout@v4
263+ - uses : actions/setup-python@v5
264+ with :
265+ python-version : 3.x
266+ - name : Download wheel
267+ uses : actions/download-artifact@v4
268+ with :
269+ name : doc_tests_wheel
270+ path : dist/
271+ - name : Append output to file
272+ run : |
273+ echo "./dist/${{ needs.build_wheel_dev.outputs.filename }}" >> pysplashsurf/pysplashsurf/docs/requirements.txt
274+ -
uses :
ammaraskar/[email protected] 275+ with :
276+ docs-folder : " pysplashsurf/pysplashsurf/docs/"
277+ - uses : actions/upload-artifact@v4
278+ with :
279+ name : DocumentationHTML
280+ path : pysplashsurf/pysplashsurf/docs/build/html/
281281
282282 # read_the_docs:
283283 # name: Read the Docs trigger
@@ -288,39 +288,39 @@ jobs:
288288 # run: |
289289 # curl -X POST -d "branches=main" -d "token=${{ secrets.READTHEDOCS_TOKEN }}" https://app.readthedocs.org/api/v2/webhook/pysplashsurf/299116/
290290
291- # tests:
292- # name: Run pytest
293- # needs: build_wheel_dev
294- # defaults:
295- # run:
296- # shell: bash -l {0}
297- # runs-on: ubuntu-latest
298- # steps:
299- # - uses: actions/checkout@v4
300- # - uses: actions/setup-python@v5
301- # with:
302- # python-version: 3.x
303- # - uses: mamba-org/setup-micromamba@v2
304- # with:
305- # environment-file: pysplashsurf/python_environment.yaml
306- # init-shell: >-
307- # bash
308- # - run: |
309- # conda info
310- # conda list
311- # - name: Download wheel
312- # uses: actions/download-artifact@v4
313- # with:
314- # name: doc_tests_wheel
315- # path: dist/
316- # - run: pip install dist/${{ needs.build_wheel_dev.outputs.filename }}
317- # - name: Install splashsurf CLI
318- # run: cargo install splashsurf
319- # - name: Run pytest
320- # uses: pavelzw/pytest-action@v2
321- # with:
322- # verbose: true
323- # emoji: false
324- # job-summary: true
325- # click-to-expand: true
326- # report-title: 'Pytest Report'
291+ tests :
292+ name : Run pytest
293+ needs : build_wheel_dev
294+ defaults :
295+ run :
296+ shell : bash -l {0}
297+ runs-on : ubuntu-latest
298+ steps :
299+ - uses : actions/checkout@v4
300+ - uses : actions/setup-python@v5
301+ with :
302+ python-version : 3.x
303+ - uses : mamba-org/setup-micromamba@v2
304+ with :
305+ environment-file : pysplashsurf/python_environment.yaml
306+ init-shell : >-
307+ bash
308+ - run : |
309+ conda info
310+ conda list
311+ - name : Download wheel
312+ uses : actions/download-artifact@v4
313+ with :
314+ name : doc_tests_wheel
315+ path : dist/
316+ - run : pip install dist/${{ needs.build_wheel_dev.outputs.filename }}
317+ - name : Install splashsurf CLI
318+ run : cargo install splashsurf
319+ - name : Run pytest
320+ uses : pavelzw/pytest-action@v2
321+ with :
322+ verbose : true
323+ emoji : false
324+ job-summary : true
325+ click-to-expand : true
326+ report-title : ' Pytest Report'
0 commit comments