Skip to content

Add a GitHub workflow for unit testing #1

Add a GitHub workflow for unit testing

Add a GitHub workflow for unit testing #1

Workflow file for this run

name: Unit tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
unittest:
runs-on: ubuntu-latest
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: setup-micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
environment-file: environment.yml
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
- name: install-package
shell: bash -l {0}
run: |
micromamba info
micromamba list
python setup.py develop
- name: run-tests
shell: bash -l {0}
run: |
pip install pytest pytest-cov
pytest --cov=./ --cov-report=xml
- name: check-coverage
uses: codecov/codecov-action@v3
with:
verbose: true # optional (default = false)