Skip to content

Refactor for public release #31

Refactor for public release

Refactor for public release #31

Workflow file for this run

name: Ruff
on:
- pull_request
jobs:
Ruff:
defaults:
run:
shell: bash
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
# install or use cached dependencies
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
# always install current root package
- name: Install library
run: poetry install --no-interaction
#----------------------------------------------
# ----- run ruff -----
#----------------------------------------------
- name: Run Ruff Check
run: |
source $VENV
ruff check --output-format=github .
- name: Run Ruff Format Check
run: |
source $VENV
ruff format --check .