Skip to content

chore: update dependencies, use Ruff #203

chore: update dependencies, use Ruff

chore: update dependencies, use Ruff #203

Workflow file for this run

name: Main
on:
push:
paths-ignore:
- 'docs/**'
branches:
- master
pull_request:
paths-ignore:
- 'docs/**'
branches:
- '**'
env:
default_python_version: "3.11"
jobs:
lint:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.default_python_version }}
- name: Run pre-commit
uses: pre-commit/[email protected]
tests:
name: Tests (${{ matrix.os }} / Python ${{ matrix.python }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install project dependencies
run: |
# See: https://github.com/python-poetry/poetry/issues/4210
poetry config experimental.new-installer false
poetry install
- name: Run tests with coverage
run: poetry run inv cover --report
- name: Send coverage results to Codecov
uses: codecov/[email protected]
with:
files: reports/coverage.xml
flags: unittests
name: Python ${{ matrix.python }}
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.default_python_version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install project dependencies
run: poetry install --extras doc
- name: Generate documentation
run: poetry run inv doc
success:
name: Main Workflow Succeeded
runs-on: ubuntu-latest
needs: [lint, tests, docs]
steps:
- name: Empty job for easier merge condition
run: echo "✔ Success"