pyodide pack: Add support for packages installed with micropip #97
Workflow file for this run
This file contains 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: Main CI workflow | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install -e ".[dev]" | |
- name: Test package without examples (no node required) | |
run: | | |
pytest pyodide_pack/ | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.6.1" | |
- name: Install the pyodide npm package | |
run: | | |
npm install [email protected] | |
- name: Test package + examples | |
run: | | |
pytest --cov=. -n 2 --cov-report=xml | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
environment: PyPi-deploy | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: 3.10.2 | |
- name: Install requirements and build wheel | |
shell: bash -l {0} | |
run: | | |
python -m pip install build twine | |
python -m build . | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |