Skip to content

Commit

Permalink
Merge pull request #1 from ezmsg-org/dev
Browse files Browse the repository at this point in the history
Publisher keep alive and GH workflow
  • Loading branch information
cboulay committed Jun 14, 2024
2 parents 79f0e64 + 16cb13b commit 17fe998
Show file tree
Hide file tree
Showing 6 changed files with 353 additions and 23 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/python-publish-ezmsg-zmq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package - ezmsg-zmq

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build ezmsg-zmq
run: python -m build extensions/ezmsg-zmq
- name: Publish ezmsg-zmq
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
password: ${{ secrets.PYPI_API_TOKEN_ZMQ }}
packages_dir: extensions/ezmsg-zmq/dist
51 changes: 51 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test package

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip and install pipx
run: |
python -m pip install --upgrade pip pipx flake8
- name: Install Poetry via pipx
run: |
pipx install poetry
echo "$HOME/.local/bin/" >> $GITHUB_PATH
- name: Install dependencies with Poetry
run: |
poetry install --with test
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test ezmsg-zmq
run: |
poetry run python -m pytest -v tests
231 changes: 230 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ezmsg-zmq"
version = "1.1.5"
version = "1.1.6"
description = "Zero-MQ pub/sub units for ezmsg"
authors = [
"Milsap, Griffin <griffin.milsap@gmail.com>",
Expand All @@ -16,6 +16,12 @@ pyzmq = "^25.1.2"
ezmsg = "^3.3.3"


[tool.poetry.group.test.dependencies]
pytest = "^7.0.0"
pytest-cov = "*"
flake8 = "*"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Loading

0 comments on commit 17fe998

Please sign in to comment.