Skip to content

Commit

Permalink
Add deploy and run tests workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsorby committed Jan 29, 2025
1 parent 7c9ae7f commit 241e010
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy library

on:
push:
tags:
- "v*.*.*"

jobs:
build-and-release-package:
if: github.repository == 'ABI-Software/segmentationstitcher'
runs-on: ubuntu-20.04
name: Release package
permissions:
contents: write
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Release Python package
uses: hsorby/release-python-package-action@v1
with:
pypi-package-name: segmentationstitcher
28 changes: 28 additions & 0 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test library

on:
pull_request:

jobs:
build-and-test:
runs-on: ubuntu-22.04
name: Run tests
steps:
- name: Clone source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
sudo apt install libopengl0 libglu1-mesa -y
- name: Install library
shell: bash
run: |
#pip install https://github.com/cmlibs/zinc/releases/download/v4.2.0/cmlibs.zinc-4.2.0-cp311-cp311-linux_x86_64.whl
pip install .
- name: Run tests
shell: bash
run: |
python -m unittest discover -s tests/

0 comments on commit 241e010

Please sign in to comment.