Skip to content

Merge pull request #285 from manparvesh/v2 #7

Merge pull request #285 from manparvesh/v2

Merge pull request #285 from manparvesh/v2 #7

Workflow file for this run

name: CI
on:
push:
branches:
- v2
pull_request:
branches:
- v2
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Configure Poetry to use the local cache
run: poetry config virtualenvs.in-project false
- name: Install dependencies
run: poetry install --no-interaction --no-ansi
- name: Run Tests
run: poetry run pytest
- name: Build the package
run: poetry build
- name: Publish to PyPI
if: github.ref == 'refs/heads/v2' && github.event_name == 'push'
run: poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}