Jacob Schmidt 196ba2b49b
All checks were successful
Test and Publish / test (3.13) (push) Successful in 9s
Test and Publish / build (push) Has been skipped
feat: add GitHub Actions workflow for testing and publishing
2025-04-16 19:25:06 -05:00

65 lines
1.3 KiB
YAML

name: Test and Publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.13]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .
# - name: Run tests
# run: |
# pytest tests/
# env:
# FIREFLY_HOST: localhost
# FIREFLY_PORT: 6379
build:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools twine wheel
- name: Build package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*