Refactor of fMRIPrep to PETPrep #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v2 | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: petprep | |
environment-file: environment.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@v2 | |
with: | |
name: coverage | |
path: coverage.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
file: ./coverage.xml | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |