Skip to content

Set tests to run on push to main #356

Set tests to run on push to main

Set tests to run on push to main #356

Workflow file for this run

name: Run Tests
on:
pull_request:
push:
branches: [main]
jobs:
pytest:
name: pytest
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install and configure Poetry
run: |
pip install poetry==1.3.2
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run pytest
run: poetry run pytest