Skip to content

Add coverage badge to readme #3

Add coverage badge to readme

Add coverage badge to readme #3

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}
# Currently we install the latest repo version of xcube, since
# xcube.webapi.ows.coverages.request.CoverageRequest is required for
# some tests and hasn't made it into a release yet.
run: |
micromamba info
micromamba list
pip install git+https://github.com/dcs4cop/xcube.git@master
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)