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 specific job
act -j backend-tests
act -j frontend-tests
act -j e2e-tests
# 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:
- Backend Tests - Unit and integration tests across Python 3.11, 3.12, 3.13
- Frontend Tests - TypeScript type checking and ESLint
- E2E Tests - Playwright end-to-end tests
All tests run automatically on:
- Push to
mainordevelopbranches - Pull requests to
mainordevelopbranches
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