Repository navigation
Open
Description
I'm following the instructions in the readme. This is my workflow definition which uses your main workflow as instructed.
name: Pyodide
on:
workflow_dispatch: {}
workflow_call: {}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pyodide
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pyodide-build>=0.27
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Build pyodide package
run: pyodide build
- name: Upload pyodide wheel
uses: actions/upload-artifact@v4
with:
name: pyodide_wheel
path: dist
test:
needs: build
uses: pyodide/pytest-pyodide/.github/workflows/main.yaml@main
with:
build-artifact-name: pyodide_wheel
build-artifact-path: dist
browser: firefox
runner: selenium
pyodide-version: 0.27.2When I run action, I hit an error because the --cov argument for pytest is not recognized. You can see the error here https://github.com/Midnighter/httpx-limiter/actions/runs/20825384915/job/59825311877?pr=12#step:12:20
I'm thinking that this is because I'm hitting the condition that only installs pytest-pyodide (here). So that path should probably also install pytest-cov.
However, I'm failing to see why you would always check coverage of pytest_pyodide as defined in this line. I can't see anyone caring about that when they run your workflow on their own package. Or am I missing something here?
Metadata
Metadata
Assignees
Labels
No labels
Activity
Midnighter commentedon Jan 8, 2026
I copied your workflow definition, removed
--covargument and now it runs fine.ryanking13 commentedon Jan 9, 2026
Good catch, thanks. Yes,
pytest-covis used only for testing the coverage for this package.The root issue is that the main.yaml file is used for testing pytest-pyodide itself and also mentioned in our README so that it can be used in downstream repositories that want to use pytest-pyodide. I think we should separate that.
Midnighter commentedon Nov 7, 2026
Hi again,
I was wondering if there is an intention to provide a reusable workflow for users of pytest-pyodide? I recently updated my own, but I'd love a solution that ensures that my workflow stays up-to-date with pyodide.
ryanking13 commentedon Nov 9, 2026
Perhaps yes. To be honest, I previously felt that maintaining subworkflows for external users within the
pytest-pyodiderepository created an unnecessary maintenance burden. However, in this era of AI agents, perhaps we could leverage an agent to devise a cleaner, more manageable approach.Midnighter commentedon Nov 9, 2026
I can very well empathize with that sentiment. I'd appreciate having a canonical example, at least. As an example, it seems no longer necessary to have a separate emscripten step, as that is now bundled. Keeping abreast of such changes is rather difficult from a distance.