Skip to content

Bump cache action from v2 to v4 #67

Bump cache action from v2 to v4

Bump cache action from v2 to v4 #67

Workflow file for this run

name: Tests
on:
push:
branches:
- "main"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.event.pull_request == null # Prevent push CI for PRs
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Poetry install
run: poetry install -vvv
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Tests
run: poetry run pytest