Skip to content

feat: Nested states (compound / parallel) and support for SCXML (test suit) #492

feat: Nested states (compound / parallel) and support for SCXML (test suit)

feat: Nested states (compound / parallel) and support for SCXML (test suit) #492

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python checks
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- run: git fetch origin develop
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-suffix: "python${{ matrix.python-version }}"
- name: Install the project
run: uv sync --all-extras --dev
#----------------------------------------------
# run ruff
#----------------------------------------------
- name: Linter with ruff
if: matrix.python-version == 3.13
run: |
uv run ruff check .
uv run ruff format --check .
#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Test with pytest
run: |
uv run pytest -n auto --cov --cov-report=xml:coverage.xml
uv run coverage xml
#----------------------------------------------
# upload coverage
#----------------------------------------------
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == 3.13
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
directory: .
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true