Skip to content

Update publish-to-pypi.yaml (#27) #71

Update publish-to-pypi.yaml (#27)

Update publish-to-pypi.yaml (#27) #71

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.11]
tensorflow-version: [2.13, 2.15]
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history to ensure tags are available
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
# Build the package
- name: Build the package
run: |
python -m build
# Install tensorflow
- name: Install tensorflow
run: |
pip install tensorflow==${{ matrix.tensorflow-version }}
# Install the package
- name: Install the package
run: |
pip install dist/*.whl
# Run tests
- name: Run tests
run: |
pip install pytest
pytest -vv tests
# Test entry points
- name: Test entry points
run: |
pyapetnet_list_models
pyapetnet_predict_from_nifti -h
pyapetnet_predict_from_dicom -h