Skip to content

Make parallel model loading more robust #20

Make parallel model loading more robust

Make parallel model loading more robust #20

name: CI (build and test)
on:
push:
branches:
- main
tags:
- "*"
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
tests:
strategy:
matrix:
os: [ubuntu-22.04, macos-latest]
name: "Core, ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
persist-credentials: false
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.8.0
with:
cache: true
environments: dev
- name: Check if manifest has changed
run: pixi run -e dev fractal-manifest check --package fractal_microsam_segmentation_task
- name: Test core library with pytest
run: pixi run -e dev pytest tests
deploy:
name: Deploy
needs: tests
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing on PyPi
# see https://docs.pypi.org/trusted-publishers/
id-token: write
# This permission allows writing releases
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: 👷 Build
run: |
python -m pip install build
python -m build
- name: 🚢 Publish to PyPI
# TODO remove the "if: false" line when the package is ready for pypi release
if: false
uses: pypa/gh-action-pypi-publish@release/v1
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: './dist/*'