Skip to content

Migrate to Mkdocs and Ruff #149

Migrate to Mkdocs and Ruff

Migrate to Mkdocs and Ruff #149

Workflow file for this run

name: "Testing"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tox:
name: "Tox Tests"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os:
- ubuntu-latest
- macos-latest
# - windows-latest
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with test
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
#----------------------------------------------
# Run tox testing
#----------------------------------------------
- name: Test with tox
run: poetry run tox -e py