Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
name: Tests

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

env:
POETRY_VERSION: 1.5.1

jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Load cached Poetry installation
id: poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-install-${{env.POETRY_VERSION}}-${{ runner.os }}-${{ matrix.python-version }}

- name: Install and configure Poetry
uses: snok/install-poetry@v1
if: steps.poetry.outputs.cache-hit != 'true'
with:
version: 1.5.1
version: ${{env.POETRY_VERSION}}
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-in-project: false

- name: Cache Poetry cache
uses: actions/cache@v3
id: cache
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{env.POETRY_VERSION}}-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install -v -E toml -E yaml -E azure -E aws -E gcp -E vault

- name: Run pytest
Expand Down