Skip to content

Commit

Permalink
FIX: Disable pytest caching
Browse files Browse the repository at this point in the history
The pytest test suite is trying to generate additional
files and it tries to save them to a filesystem that is
for some reason read-only. Since this workflow runs
only in a temporary CI job, the `.pyc` file generation
can be disabled.

Some other fixes are included as well:

1. pydantic<2 not needed anymore
2. Skip the job on forks
3. More readable condition for Anaconda upload
step
  • Loading branch information
agriyakhetarpal committed May 29, 2024
1 parent f41261e commit d68c160
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
build_wasm_emscripten:
name: Build PyWavelets for Pyodide
runs-on: ubuntu-latest
# Uncomment the following line to test changes on a fork
# if: github.repository == 'PyWavelets/pywt'
# Comment out the following line to test changes on a fork
if: github.repository == 'PyWavelets/pywt'
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Install prerequisites
run: |
python -m pip install pyodide-build "pydantic<2"
python -m pip install pyodide-build
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
- name: Set up Emscripten toolchain
Expand All @@ -70,12 +70,16 @@ jobs:
pushd demo
pip install matplotlib pytest
python -c "import pywt; print(pywt.__version__)"
pytest --pyargs pywt -m "not slow"
pytest -p no:cacheprovider --pyargs pywt -m "not slow"
# https://anaconda.org/scientific-python-nightly-wheels/pywavelets
# WARNING: this job will overwrite existing wheels.
- name: Push to Anaconda PyPI index
if: (github.repository == 'PyWavelets/pywt') && (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') || (github.event_name == 'schedule')
if: >-
(github.repository == 'PyWavelets/pywt') &&
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||
(github.event_name == 'schedule')
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # v0.5.0
with:
artifacts_path: dist/
Expand Down

0 comments on commit d68c160

Please sign in to comment.