Add pytest with a /health test and GitHub Actions CI

Open Beginner friendly
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-2 days
Newbie friendliness
90/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
fastapi, github-actions, python
Domain
backend, ci-cd, testing

Research direction

Start with the FastAPI app entry point and the actions/setup-python starter workflow, then create backend/tests/test_health.py, backend/requirements-dev.txt, and .github/workflows/ci.yml as described. Use FastAPI's TestClient to exercise /health without a database. Done means pytest passes locally and GitHub Actions runs it on every pull request with a green check.

Written by the indexing model from the issue text.

Description

good first issue

Why

Every PR should prove it didn't break the app. This issue sets up the testing and CI pattern that everyone else will copy.

Files to touch

  • backend/tests/test_health.py (new)
  • backend/requirements-dev.txt (new) or add pytest + httpx to requirements.txt
  • .github/workflows/ci.yml (new)

Definition of done

  • pytest passes locally with one test hitting /health via FastAPI's TestClient
  • A GitHub Actions workflow runs pytest on every pull request
  • The workflow shows a green check on this PR

Hints

No database is needed yet since /health doesn't touch Postgres. Start from the actions/setup-python starter workflow. FastAPI testing docs: https://fastapi.tiangolo.com/tutorial/testing/

Dominant language
JavaScript
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WSU-Software-Development-Club/self-hosting

All issues in WSU-Software-Development-Club/self-hosting

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.