Skip to content

Commit f0bd568

Browse files
author
Hood Chatham
authored
Set up pytest node tests (pyodide#1717)
1 parent c8436c3 commit f0bd568

31 files changed

+695
-399
lines changed

.circleci/config.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
defaults: &defaults
44
working_directory: ~/repo
55
docker:
6-
- image: pyodide/pyodide-env:18
6+
- image: pyodide/pyodide-env:19
77
environment:
88
- EMSDK_NUM_CORES: 3
99
EMCC_CORES: 3
@@ -26,11 +26,6 @@ jobs:
2626
steps:
2727
- checkout
2828

29-
- run:
30-
name: Install prerequisites
31-
command: |
32-
pip install -r docs/requirements-doc.txt
33-
3429
- run:
3530
name: Test docs
3631
command: |
@@ -166,7 +161,7 @@ jobs:
166161
- run:
167162
name: stack-size
168163
command: |
169-
pytest -s benchmark/stack_usage.py | sed -n 's/## //pg'
164+
pytest -s benchmark/stack_usage.py | sed -n 's/## //pg' || true
170165
171166
test-emsdk:
172167
<<: *defaults
@@ -188,11 +183,10 @@ jobs:
188183
name: test
189184
command: |
190185
mkdir test-results
191-
pip install ruamel.yaml
192186
pytest \
193187
--junitxml=test-results/junit.xml \
194188
--verbose \
195-
-k 'not (chrome or firefox)' \
189+
-k 'not (chrome or firefox or node)' \
196190
--cov=pyodide_build --cov=pyodide \
197191
src pyodide-build packages/micropip/
198192
@@ -313,6 +307,11 @@ workflows:
313307
test-params: -k firefox src packages/micropip
314308
requires:
315309
- build-core
310+
- test-main:
311+
name: test-core-node
312+
test-params: -k node src packages/micropip
313+
requires:
314+
- build-core
316315
- test-main:
317316
name: test-packages-chrome
318317
test-params: -k chrome packages/test* packages/*/test*
@@ -323,6 +322,11 @@ workflows:
323322
test-params: -k firefox packages/test* packages/*/test*
324323
requires:
325324
- build-packages
325+
- test-main:
326+
name: test-packages-node
327+
test-params: -k "node and not numpy" packages/test* packages/*/test*
328+
requires:
329+
- build-packages
326330
- test-emsdk:
327331
requires:
328332
- build-core

Dockerfile

+4-28
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,10 @@ RUN apt-get update \
1212
libgconf-2-4 "chromium=90.*" \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15-
RUN pip3 --no-cache-dir install \
16-
black \
17-
"cython<3.0" \
18-
packaging \
19-
flake8 \
20-
hypothesis \
21-
"mypy==0.812" \
22-
pytest \
23-
pytest-asyncio \
24-
pytest-cov \
25-
pytest-httpserver \
26-
pytest-instafail \
27-
pytest-rerunfailures \
28-
pytest-xdist \
29-
pyyaml \
30-
"selenium==4.0.0.b3" \
31-
# Docs requirements
32-
sphinx \
33-
sphinx_book_theme \
34-
myst-parser==0.13.3 \
35-
sphinxcontrib-napoleon \
36-
packaging \
37-
sphinx-js==3.1 \
38-
autodocsumm \
39-
docutils==0.16 \
40-
sphinx-argparse-cli~=1.6.0 \
41-
sphinx-version-warning~=1.1.2 \
42-
sphinx-issues
15+
ADD docs/requirements-doc.txt requirements.txt /
16+
17+
RUN pip3 --no-cache-dir install -r /requirements.txt \
18+
&& pip3 --no-cache-dir install -r /requirements-doc.txt
4319

4420
# Get firefox 70.0.1 and geckodriver
4521
RUN wget -qO- https://ftp.mozilla.org/pub/firefox/releases/87.0/linux-x86_64/en-US/firefox-87.0.tar.bz2 | tar jx \

0 commit comments

Comments
 (0)