Skip to content

Tests: GenericArchive cassette migration (unit tier) #171

Tests: GenericArchive cassette migration (unit tier)

Tests: GenericArchive cassette migration (unit tier) #171

Workflow file for this run

name: wasm_tests.yml
on: [push, pull_request]
jobs:
build-wheel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.13'
allow-prereleases: true
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build wheel
run: |
python -m build --wheel
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: speasy-wheel
path: dist/*.whl
test:
needs: build-wheel
runs-on: ubuntu-latest
env:
DISPLAY: :99
FORCE_COLOR: 3
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.13'
allow-prereleases: true
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: latest
- name: Cache Playwright Browsers
uses: actions/cache@v5
with:
path: .cache/ms-playwright
key: ${{ runner.os }}-playwright-latest
- name: Install Playwright Browsers
run: pip install playwright && python -m playwright install --with-deps
# - name: Download pyodide wheel artifact
# uses: pyodide/pyodide-actions/download-pyodide@v2
# with:
# version: '0.29.0'
# to: pyodide-dist
# Custom built pyodide distribution with preinstalled pycdfpp until it is available in official pyodide releases
# https://github.com/pyodide/pyodide-recipes
- name: Fetch custom pyodide distribution with preinstalled pycdfpp
run: |
wget https://sciqlop.lpp.polytechnique.fr/data/software/pyodide-0.29.0.tar.xz
tar -xf pyodide-0.29.0.tar.xz
mv pyodide-0.29.0/pyodide pyodide-dist
ls pyodide-dist/
- name: restore speasy wheel artifact
uses: actions/download-artifact@v8
with:
name: speasy-wheel
path: pyodide-dist/
- name: Install browser for selenium tests
uses: pyodide/pyodide-actions/install-browser@0876419b7ac412db2b84e86499bc95ff3b64b004
with:
runner: selenium
browser: chrome
browser-version: latest
- name: install pyodide-py
run: |
python -m pip install pyodide-py==0.29.0
- name: Install pytest-pyodide
run: python -m pip install pytest-pyodide
- name: Run tests
# Override the pyproject default `addopts = "-m unit"` so the
# contract-marked test_wasm.py module is collected here.
run: |
python -m pytest -vra -m '' \
--dist-dir=./pyodide-dist/ \
--runner=selenium \
--rt=chrome \
tests/test_wasm.py