Update CI and docs #594
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| env: | |
| PYTHON_VERSION: 3.13 | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| jobs: | |
| test-browser: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environments/environment-dev.yml | |
| environment-name: pyjs-dev | |
| - name: Install Playwright | |
| run: | | |
| playwright install | |
| - name: Create WASM environment to build pyjs | |
| run: | | |
| micromamba create -n pyjs-build-wasm \ | |
| --platform=emscripten-wasm32 \ | |
| -f environments/environment-wasm.yml \ | |
| --yes | |
| - name: Build pyjs | |
| run: | | |
| export PREFIX=$MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm | |
| ./scripts/build_pyjs.sh $PREFIX | |
| - name: Create test environment with numpy | |
| run: | | |
| micromamba create -n pyjs-wasm-test-with-numpy \ | |
| --platform=emscripten-wasm32 \ | |
| -f environments/environment-wasm-test.yml \ | |
| numpy \ | |
| --yes | |
| - name: Test browser-main with numpy | |
| run: | | |
| pyjs_code_runner run script \ | |
| browser-main \ | |
| --conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-wasm-test-with-numpy \ | |
| --mount $(pwd)/tests:/tests \ | |
| --mount $(pwd)/module/pyjs:/lib/python${PYTHON_VERSION}/site-packages/pyjs \ | |
| --script main.py \ | |
| --work-dir /tests \ | |
| --pyjs-dir $(pwd)/build \ | |
| --headless \ | |
| --async-main | |
| - name: Test browser-worker with numpy | |
| run: | | |
| pyjs_code_runner run script \ | |
| browser-worker \ | |
| --conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-wasm-test-with-numpy \ | |
| --mount $(pwd)/tests:/tests \ | |
| --mount $(pwd)/module/pyjs:/lib/python${PYTHON_VERSION}/site-packages/pyjs \ | |
| --script main.py \ | |
| --work-dir /tests \ | |
| --pyjs-dir $(pwd)/build \ | |
| --headless \ | |
| --async-main | |
| - name: Create test environment without numpy | |
| run: | | |
| micromamba create -n pyjs-wasm-test-no-numpy \ | |
| --platform=emscripten-wasm32 \ | |
| -f environments/environment-wasm-test.yml \ | |
| --yes | |
| - name: Test browser-main without numpy | |
| run: | | |
| pyjs_code_runner run script \ | |
| browser-main \ | |
| --conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-wasm-test-no-numpy \ | |
| --mount $(pwd)/tests:/tests \ | |
| --mount $(pwd)/module/pyjs:/lib/python${PYTHON_VERSION}/site-packages/pyjs \ | |
| --script main.py \ | |
| --work-dir /tests \ | |
| --pyjs-dir $(pwd)/build \ | |
| --headless \ | |
| --async-main \ | |
| --no-cache |