name: Run Tests

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        python-version: ["3.10"]
        poetry-version: ["1.1"]

    steps:
    - uses: actions/checkout@v3
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v3
      with:
        python-version: ${{ matrix.python-version }}

    - name: Set up Poetry ${{ matrix.poetry-version }}
      uses: abatilo/actions-poetry@v2.0.0
      with:
        poetry-version: ${{ matrix.poetry-version }}
    - name: Install Dependencies
      run: |
        poetry install
    - name: Run Tests
      run: |
        poetry run pytest

name: Run Tests

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        python-version: ["3.10"]

    steps:
    - uses: actions/checkout@v3
    - name: Install poetry
      run: pipx install poetry
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v3
      with:
        python-version: ${{ matrix.python-version }}
        cache: 'poetry'
    - name: Install Dependencies
      run: |
        poetry install
    - name: Run Tests
      run: |
        poetry run pytest

Use GitHub example for poetry caching
Use GitHub example for poetry caching

https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md
