Skip to content

Update python-package.yml #7

Update python-package.yml

Update python-package.yml #7

name: Python package
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10, 3.11]
steps:
- uses: actions/checkout@v2
- name: Setup Python and Poetry
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: ${{ matrix.python-version }}
poetry-version: '1.7.1' # Specify the desired Poetry version
- name: Create and Activate Virtual Environment
run: |
python -m venv .venv
source .venv/bin/activate
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest