Merge pull request #34 from trchudley/josseditorcomments #74
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
# https://pytest-with-eric.com/integrations/pytest-github-actions/ | |
# https://github.com/mamba-org/setup-micromamba | |
name: Run unit tests | |
on: | |
- push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.10" | |
- "3.11" | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set up mamba environment and dependencies | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: latest | |
environment-file: environment.yml | |
create-args: pytest pytest-cov | |
init-shell: bash powershell | |
cache-environment: true | |
post-cleanup: all | |
- name: Install EGL mesa for opencv functionality | |
shell: micromamba-shell {0} | |
run: | | |
sudo apt-get update -y -qq | |
sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev | |
- name: Check if EGL library exists | |
run: ldconfig -p | grep EGL | |
- name: Install pdemtools | |
shell: micromamba-shell {0} | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install --upgrade setuptools | |
cd $GITHUB_WORKSPACE | |
pip install . | |
- name: Test with pytest | |
shell: micromamba-shell {0} | |
run: | | |
coverage run -m pytest -v -s | |
- name: Generate pytest coverage report | |
shell: micromamba-shell {0} | |
run: | | |
coverage report -m | |