-
Notifications
You must be signed in to change notification settings - Fork 10
102 lines (86 loc) · 2.75 KB
/
wasm_tests.yml
File metadata and controls
102 lines (86 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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