Skip to content

Add Student 4 post-commit endpoint tests to CI - #205

Merged
JulianKirk merged 2 commits into
mainfrom
Student4/AddPostCommitTesting
Oct 28, 2026
Merged

JulianKirk merged 2 commits into
mainfrom
Student4/AddPostCommitTesting

Conversation

@JulianKirk

Copy link
Copy Markdown
Collaborator

Summary

Release 2 requires post-commit testing of two backend/API endpoint functions per student through student-4-ci.yml. Student 4 had no such step; this adds it, following the Student 3 pattern.

  • Endpoint 1, create and read an activity: POST /activity then GET /activity/{id}, plus an unknown-category 400 and an unknown-id 404.
  • Endpoint 2, search activities: QUERY /activity with text, location, category, price and party-size filters, plus a non-matching search and an unsupported-category 400.
  • Tests live in student-4/tests/endpoint/ and run over HTTP against the built images on 127.0.0.1:18008. They clean up the activity they create, and skip when STUDENT4_ENDPOINT_BASE_URL is unset, so offline pytest student-4/tests is unchanged.
  • The compose job starts shared-database and shared-backend (--no-deps) because activities resolve country/city names through the shared reference service. It then writes a results table to the step summary and uploads student-4-endpoint-test-evidence (JUnit XML + Markdown).
  • tests/endpoint added to the strict mypy configuration and CI type-check step.

Local verification

  • Live Compose stack (shared + Student 4 backend/database): pytest student-4/tests/endpoint -v, 6 passed
  • ruff check student-4, ruff format --check student-4: pass
  • Strict mypy over the CI paths plus tests/endpoint: no issues
  • pytest student-4/tests -q: pass (endpoint tests skipped offline)
  • .github/tests/test_workflow_self_triggers.py + tests/ci: 70 passed

The CI run on this PR is the first run of the new workflow steps.

🤖 Generated with Claude Code

JulianKirk and others added 2 commits October 27, 2026 19:06
Run two backend/API endpoint functions over HTTP against the live
Compose slice: create/read an activity, and search with QUERY /activity.
The compose job starts the shared reference service for location
lookup, publishes a results table to the step summary and uploads the
JUnit and Markdown evidence. The module skips without
STUDENT4_ENDPOINT_BASE_URL so offline pytest runs are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JulianKirk
JulianKirk merged commit 2200014 into main Oct 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant