Skip to content

Add GitHub Actions workflow for Python tests with Poetry #1

Add GitHub Actions workflow for Python tests with Poetry

Add GitHub Actions workflow for Python tests with Poetry #1

Workflow file for this run

name: Python Unit Tests with Poetry
on:
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.10]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
- name: Install dependencies with Poetry
run: |
poetry install
- name: Run tests with pytest via Poetry
run: |
poetry run pytest