Skip to content

Create poetry-test.yml #1

Create poetry-test.yml

Create poetry-test.yml #1

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions using Poetry
name: poetry-test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Cache the installation of Poetry itself. This prevents the workflow
# from installing Poetry every time, which can be slow
- name: Cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.8.2-0
- name: Run image
uses: abatilo/actions-poetry@v3.0.0
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install project dependencies
run: poetry install --no-interaction
- name: Run tests
run: poetry run pytest -v