Skip to content

Fix/open issues

Fix/open issues #53

Workflow file for this run

name: Test and publish SARIAD
on:
push:
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
# Not through actions/checkout: with submodules enabled it always runs `git submodule foreach --recursive`,
# which fails on the SARATR-X fork (its nested detection/apex submodule has no URL in .gitmodules).
- name: Check out the submodules
run: git submodule update --init
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install (CPU-only PyTorch keeps the install small)
run: |
python -m pip install --upgrade pip
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"
- name: Run the tests
env:
MLFLOW_DISABLE_AGENT_HINT: "1"
run: pytest
build:
name: Build distribution
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Check out the submodules
run: git submodule update --init
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish SARIAD on PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/SARIAD
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish SARIAD on PyPI
uses: pypa/gh-action-pypi-publish@release/v1