Skip to content

Dev

Dev #68

Workflow file for this run

name: Codecov
on:
push:
branches: [ "main" ]
paths:
- '.github/workflows/codecov.yaml'
- '.github/.codecov.yml'
- 'config/**'
- 'tests/**'
- 'test_data/**'
- 'workflow/**'
- 'koverage/**'
- 'setup.py'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/codecov.yaml'
- '.github/.codecov.yml'
- 'config/**'
- 'tests/**'
- 'test_data/**'
- 'workflow/**'
- 'koverage/**'
- 'setup.py'
permissions:
contents: read
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
steps:
- uses: "actions/checkout@v3"
with:
fetch-depth: 0
# Setup env
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
mamba-version: "*"
channels: conda-forge,bioconda,defaults
channel-priority: strict
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: "Test and generate coverage report on ${{ matrix.os }} for Python ${{ matrix.python-version }}"
run: |
python -m pip install --upgrade pip
python -m pip install pytest coverage
python -m pip install .
coverage run -m pytest
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: true