Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.23 KB

File metadata and controls

65 lines (43 loc) · 1.23 KB

Testing (test and continuous integration)

Quick reference for day-to-day developer commands.

Run the test suite (fast / parallel)

Terminal (pwsh / bash):

# Run all tests in parallel
uv run pytest -n logical

Run CI-like tests with coverage (CI-like thresholds)

Terminal (pwsh / bash):

# Run tests with coverage reporting and thresholds like in CI with slow tests included
uv run pytest --cov --cov-report term:skip-covered --cov-fail-under 70 -n logical --slow

Run package-specific tests

Terminal (pwsh / bash):

# Run tests for the openevfleet package in parallel
uv run pytest packages/openevfleet -n logical

Tests in Pre-commit

Run pre-commit hooks for testing.

Terminal (pwsh / bash):

# Run the pytest hook in pre-push stage
pre-commit run --all-files --hook-stage pre-push pytest

GitLab CI locally (optional)

If you have gitlab-ci-local and Docker installed you can run CI jobs locally.

Terminal (pwsh / bash):

# Run GitLab CI jobs locally
gitlab-ci-local

GitHub Actions locally (optional)

If you have act and Docker installed you can run GitHub Actions workflows locally.

Terminal (pwsh / bash):

# Run GitHub Actions workflows locally
act