This document describes how to run tests for all components of the tasks project.
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
pytest tests/unit -v
pytest tests/integration -v
pytest tests/ -v # Run all testscd web
npm install
npm run lintcd tests
npm install
npx playwright install chromium
npx playwright test# Backend
cd backend
ruff check .
# Simulator
cd simulator
ruff check .
# Frontend
cd web
npm run lintUse act to run GitHub Actions workflows locally.
macOS:
brew install actLinux:
# Download from https://github.com/nektos/act/releases
# Or use package manager if availablePrerequisites:
- Docker must be installed and running
# List all workflows
act -l
# Run all workflows
act
# Run specific workflow file
act -W .github/workflows/tests.yml
# Run one job
act -j frontend -W .github/workflows/tests.yml
act -j e2e-tests -W .github/workflows/tests.yml
# Run on specific event
act push
act pull_request- If Docker images fail:
act --pull=false - For verbose output:
act -v - To use secrets: Create
.secretsfile and useact --secret-file .secrets
See .github/workflows/README.md for more details.
The GitHub Actions workflow (.github/workflows/tests.yml) runs:
- Lint — Ruff (backend, simulator), ESLint + typecheck (frontend)
- Frontend checks — translation keys, Vitest unit tests
- Backend tests — unit and integration tests across Python 3.11, 3.12, 3.13
- E2E tests — Playwright end-to-end tests
All checks run automatically on push and pull requests to main or develop. Use the ci job as the required status check for branch protection.
Path-filtered workflows also run separately:
build-web.yml— Next.js production build whenweb/**changeslint-dockerfiles.yml— Dockerfile lint when Dockerfiles changedocker-build.yml— GHCR image builds onmainand relevant PRs
backend/
tests/
unit/ # Unit tests for services and utilities
integration/ # Integration tests for resolvers
conftest.py # Shared test fixtures
tests/
e2e/ # End-to-end Playwright tests
*.spec.ts # Test specifications
playwright.config.ts
package.json # E2E test dependencies
If you see npm ci errors about lock file sync:
cd web # or tests
rm -rf node_modules package-lock.json
npm installcd tests
npx playwright install chromiumEnsure you're in a virtual environment with dependencies installed:
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt