Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Update pyproject.toml for Poetry 2.0, adopting PEP 621 standards #243

Update pyproject.toml for Poetry 2.0, adopting PEP 621 standards

Update pyproject.toml for Poetry 2.0, adopting PEP 621 standards #243

Workflow file for this run

name: pr-check
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
codespell:
name: Codespell
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@master
with:
ignore_words_list: .codespellignore
check_filenames: true
check_hidden: false
skip: "*.patch"
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
python-api-packages: ${{ steps.python.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: python
with:
filters: |
frinx-inventory-server/python:
- 'frinx-inventory-server/python/**'
resource-manager/python:
- 'resource-manager/python/**'
schellar/python:
- 'schellar/python/**'
topology-discovery/python:
- 'topology-discovery/python/**'
performance-monitor/python:
- 'performance-monitor/python/**'
blueprints-provider/python:
- 'blueprints-provider/python/**'
uniconfig/python:
- 'uniconfig/python/**'
utils/graphql-pydantic-converter:
- 'utils/graphql-pydantic-converter/**'
code-validate:
name: Validate api packages
runs-on: ubuntu-latest
timeout-minutes: 5
needs: changes
if: ${{ needs.changes.outputs.python-api-packages != '[]' && needs.changes.outputs.python-api-packages != '' }}
strategy:
fail-fast: false
matrix:
directories: ${{ fromJSON(needs.changes.outputs.python-api-packages) }}
defaults:
run:
working-directory: ${{ matrix.directories }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "2.0.1"
- name: Install package dependencies.
run: poetry install
- name: Run mypy.
run: poetry run mypy .
- name: Run ruff.
run: poetry run ruff .
- name: Run pyright.
run: poetry run pyright .
- name: Run pytests.
run: |
if [[ -d tests ]]; then
poetry run pytest . -vv
fi