Skip to content

v0.5.0

v0.5.0 #46

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Pre-Commit
run: python -m pip install pre-commit && pre-commit install
- name: Load cached Pre-Commit Dependencies
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Execute Pre-Commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
test:
strategy:
fail-fast: true
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
installer-parallel: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
mypy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
installer-parallel: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-ubuntu-latest-3.8-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run mypy
run: poetry run mypy