Add continuous integration #3
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: Packaging | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
conda: | |
name: "Install from conda-forge" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Install Conda environment with Micromamba" | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
cache-downloads: true | |
environment-name: pypi | |
create-args: >- | |
python=3.10 | |
pinocchio | |
upkie_description | |
- name: "Test module import" | |
run: python -c "import upkie_description; upkie_description.load_in_pinocchio()" | |
- name: "Test description loading in Pinocchio" | |
run: python -c "import upkie_description; upkie_description.load_in_pinocchio()" | |
pypi: | |
name: "Install from PyPI" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Install Conda environment with Micromamba" | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
cache-downloads: true | |
environment-name: pypi | |
create-args: >- | |
python=3.10 | |
pinocchio | |
pip | |
- name: "Install package from PyPI" | |
run: python -m pip install upkie_description | |
- name: "Test module import" | |
run: python -c "import upkie_description; upkie_description.load_in_pinocchio()" | |
- name: "Test description loading in Pinocchio" | |
run: python -c "import upkie_description; upkie_description.load_in_pinocchio()" | |
testpypi: | |
name: "Install from TestPyPI" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Install Conda environment with Micromamba" | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
cache-downloads: true | |
environment-name: pypi | |
create-args: >- | |
python=3.10 | |
pinocchio | |
pip | |
- name: "Install package from TestPyPI" | |
run: python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ upkie | |
- name: "Test module import" | |
run: python -c "import upkie_description" | |
- name: "Test description loading in Pinocchio" | |
run: python -c "import upkie_description; upkie_description.load_in_pinocchio()" | |
pkg_success: | |
name: "Packaging success" | |
runs-on: ubuntu-latest | |
needs: [pypi, testpypi] | |
steps: | |
- run: echo "Packaging workflow completed successfully" |