Skip to content

WIP: Add integration testing and github actions #90

WIP: Add integration testing and github actions

WIP: Add integration testing and github actions #90

Workflow file for this run

name: Code Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: petprep
environment-file: env.yml
auto-activate-base: true
- name: Install dependencies
run: |
conda activate petprep
pip install -e .
shell: bash -l {0}
- name: Install coverage and pytest
run: |
conda activate petprep
conda install -c conda-forge pytest coverage
shell: bash -l {0}
- name: Run tests with coverage
run: |
conda activate petprep
pytest --cov=petprep --cov-report=xml
shell: bash -l {0}
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}