Skip to content

CI: Add code coverage #110

CI: Add code coverage

CI: Add code coverage #110

name: httomolibgpu quick tests
on:
pull_request:
branches:
- main
jobs:
iris-gpu:
runs-on: iris-gpu
container:
image: nvidia/cuda:12.6.3-devel-ubi8
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
options: --gpus all --runtime=nvidia
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository code
uses: actions/checkout@main
- name: Create conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda/environment.yml
environment-name: httomo
post-cleanup: 'all'
init-shell: bash
- name: Install httomolibgpu & coverage tools
run: |
pip install .[dev]
pip install coverage
micromamba list
- name: Run tests with coverage
run: |
pytest --cov=./ tests/ --cov-report=xml:/home/runner/coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /home/runner/coverage.xml
fail_ci_if_error: true
name: httomolibgpu-codecov
verbose: true