Skip to content

requirements

requirements #5

Workflow file for this run

name: Tests with Spark
on:
push:
branches:
- dev-tests
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- '3.10'
- '3.11'
spark:
- 3.4.0
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-java@v4
with:
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
# 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 $HOME/
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 -r requirements.txt --no-cache-dir
pip install . --no-cache-dir
- name: Run tests with pytest
env:
ANTS_PATH: $HOME/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/