Skip to content

Update and rename python-app.yml to python-deploy.yml #1

Update and rename python-app.yml to python-deploy.yml

Update and rename python-app.yml to python-deploy.yml #1

Workflow file for this run

name: Python Poetry CI
on:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
test-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.14
- name: Install Poetry
run: python -m pip install poetry==1.8.2
- name: Cache virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: python -m poetry install
- name: Run tests with pytest
run: python -m poetry run python -m pytest -v
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Build and publish to PyPI
run: poetry publish --build