Skip to content

Commit

Permalink
ENH: Test coverage on PRs (#595)
Browse files Browse the repository at this point in the history
* ENH: Test coverage on PRs
  • Loading branch information
cookpa authored Mar 31, 2024
1 parent 0070a71 commit 74d13e7
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci-pytest.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: ci-pytest

# Fast tests with cached antspy build designed to test changes in the python code
# Builds on Linux only, with a single python version

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand Down Expand Up @@ -66,11 +60,11 @@ jobs:
run: |
conda create -n antspy-env python=${{ env.python_version }} -y
conda activate antspy-env
conda install -c conda-forge conda-pack
conda install -c conda-forge conda-pack coverage
conda info
pip install ./antspy-pr
conda list
antspy-pr/tests/run_tests.sh
antspy-pr/tests/run_tests.sh -c
conda pack -n antspy-env -o ~/conda-env.tar.bz2
- name: Cache Conda environment
Expand All @@ -88,8 +82,6 @@ jobs:
if: steps.cache-env.outputs.cache-hit == 'true'
run: |
conda activate antspy-env
echo "List of installed packages in cached env:"
conda list
ANTS_SITE_PACKAGES="${CONDA}/envs/antspy-env/lib/python${{ env.python_version }}/site-packages/ants"
for d in contrib core learn registration segmentation utils viz; do
rm -rf $ANTS_SITE_PACKAGES/$d;
Expand All @@ -101,4 +93,10 @@ jobs:
if: steps.cache-env.outputs.cache-hit == 'true'
run: |
conda activate antspy-env
bash antspy-pr/tests/run_tests.sh
bash antspy-pr/tests/run_tests.sh -c
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
files: antspy-pr/tests/coverage.xml

0 comments on commit 74d13e7

Please sign in to comment.