-
Notifications
You must be signed in to change notification settings - Fork 5
Testing
This project employs GitHub Actions for automated testing, linting, and build verification across both the frontend (React) and backend (FastAPI).
All checks are designed to ensure code quality, consistent formatting, and proper dependency resolution.
At present, there are no manual test suites (such as Jest or Pytest), but all CI workflows function as automated quality gates for each commit and pull request.
| Workflow | Description | Location | Trigger |
|---|---|---|---|
| Frontend CI | Installs dependencies, , runs npm test, and ensures the React app builds successfully. |
.github/workflows/frontend.yml |
On push and pull request |
| Backend CI | Runs all backend unit tests via pytest and uploads coverage reports to Codecov. |
.github/workflows/backend.yml |
On push and pull request |
| Lint & Style Check | Enforces strict code standards using ESLint and Stylelint with --max-warnings=0. |
.github/workflows/lint.yml |
On push and pull request |
Although GitHub Actions runs automatically on push or PR, you can also verify locally before committing.
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Run linter
npm run lint
#Run formatter (prettier)
npm run format
# Run build check
npm run build
#Run tests w/coverage
npm test- This will output a /coverage directory (ignored via .gitignore)
# Navigate to backend
cd backend
# Install dependencies
pip install -r requirements.txt
pip install pytest pytest-cov
# Run backend test suite with coverage
pytest --cov=. --cov-report html --cov-report term- A coverage report will be generated in: /backend/htmlcov/
- You can open
htmlcov/index.htmlin your browser to view detailed test coverage.
Backend coverage reports are automatically uploaded to Codecov through GitHub Actions.
The upload step is defined in the backend workflow:
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: backend/coverage.xml
fail_ci_if_error: trueAlthough CI triggers on each push and PR, you can also manually run workflows from the GitHub Actions tab:
- Go to Actions → Backend CI / Frontend CI / Lint & Style Check
- Click “Run workflow”
- Select the branch you wish to test
- Press Run workflow
This is useful for re-running tests after dependency updates or environment changes without creating a new commit.