Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luiztauffer committed Aug 23, 2024
1 parent 6dba925 commit 2c51b55
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 19 deletions.
46 changes: 31 additions & 15 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,41 @@ jobs:
java-version: '21'
distribution: temurin

# https://github.com/marketplace/actions/setup-apache-spark
- uses: vemonet/setup-spark@v1
with:
spark-version: ${{ matrix.spark }}
hadoop-version: '3'

- run: spark-submit --version

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pytest pytest-cov

# - name: Run tests with pytest
# run: |
# pytest --cov=voluseg --cov-report=term-missing

# - name: Upload coverage report
# if: success()
# uses: actions/upload-artifact@v3
# with:
# name: coverage-report
# path: htmlcov/
# Download and install ANTs
- name: Install ANTs
run: |
wget https://github.com/ANTsX/ANTs/releases/download/v2.5.3/ants-2.5.3-ubuntu-20.04-X64-gcc.zip
unzip ants-2.5.3-ubuntu-20.04-X64-gcc.zip -d /
rm ants-2.5.3-ubuntu-20.04-X64-gcc.zip
echo "ANTs installed successfully"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt --no-cache-dir
- name: Install voluseg
run: |
pip install . --no-cache-dir
- name: Run tests with pytest
env:
ANTS_PATH: /ants-2.5.3/bin
INPUT_PATH: /path/to/input # Set this to the actual input path
run: |
pytest --cov=voluseg --cov-report=term-missing
- name: Upload coverage report
if: success()
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: htmlcov/
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
h5py
scipy
scikit-image
scikit-learn
matplotlib
nibabel
numpy>=1.13
pandas>=0.2
h5py>=3.0
nibabel>=5.0
numpy>=2.0
pandas>=2.2
pyspark==3.4.0

0 comments on commit 2c51b55

Please sign in to comment.