Skip to content

define properties #1326

define properties

define properties #1326

Workflow file for this run

name: Testing
on: [push]
jobs:
dynamic_tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for dynamic tests
run: |
pip install .[test]
- name: Execute unit tests with coverage report [pytest]
run: |
pytest tests/software_tests --cov-report=term-missing --cov=uds -m "not integration and not performance"
- name: Execute integration tests with coverage report [pytest]
run: |
pytest tests/software_tests --cov-report=term-missing --cov=uds -m "integration"
code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for dynamic tests
run: |
pip install .[test]
- name: Execute unit tests with instruction coverage [pytest]
run: |
pytest tests/software_tests --cov-report=xml --cov=uds -m "not integration and not performance"
- name: Upload unit tests report with instruction coverage [CodeCov]
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unit-tests
- name: Execute unit tests with branch coverage [pytest]
run: |
pytest tests/software_tests --cov-report=xml --cov=uds -m "not integration and not performance" --cov-branch
- name: Upload unit tests report with branch coverage [CodeCov]
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unit-tests-branch
- name: Execute integration tests with instruction coverage [pytest]
run: |
pytest tests/software_tests --cov-report=xml --cov=uds -m "integration"
- name: Upload integration tests report with instruction coverage [CodeCov]
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: integration-tests
- name: Execute integration tests with branch coverage [pytest]
run: |
pytest tests/software_tests --cov-report=xml --cov=uds -m "integration" --cov-branch
- name: Upload integration tests report with branch coverage [CodeCov]
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: integration-tests-branch
static_code_analysis:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"] # TODO: add "3.14" once stable
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for static tests
run: |
pip install .[static-code-analysis]
- name: Execute static code analysis [prospector]
run: |
prospector --profile tests/prospector_profile.yaml uds
dependency_checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install external packages used for dependency scanning
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools
pip install .[dependency-scan]
- name: Execute dependency scanning [pip-audit]
run: |
pip-audit
sorting_imports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for sorting imports
run: |
pip install .[sorting-imports]
- name: Check imports are sorted [isort]
run: |
isort uds -c -v
isort tests -c -v
isort examples -c -v
documentation_checks:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install -r requirements.txt
- name: Install external packages used for documentation checking
run: |
pip install .[docs-checks]
- name: Check RST documentation [doc8]
run: |
doc8 docs\source