Skip to content

Add CI workflow for Python project using Poetry and GitHub Actions #1

Add CI workflow for Python project using Poetry and GitHub Actions

Add CI workflow for Python project using Poetry and GitHub Actions #1

Workflow file for this run

name: Python Poetry Workflow
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
poetry install
- name: Run tests
run: |
poetry run pytest