fix: CI test step fails due to missing venv in python:3.12-slim #12

Closed
opened 2026-03-09 18:25:51 +00:00 by forgejo_admin · 0 comments
Contributor

Lineage

Standalone fix -- no plan ancestry. CI pipeline is broken and blocking all PRs.

Repo

forgejo_admin/basketball-api

User Story

As a developer
I want the CI test step to install dependencies correctly
So that tests actually run and PRs get validated

Context

The Woodpecker CI test step runs pip install .[dev] in a bare python:3.12-slim container. PEP 668 marks system Python as externally managed, so pip refuses to install without --break-system-packages. The package never installs and tests fail with ModuleNotFoundError: No module named 'basketball_api'. The fix is to create a venv in the test step so pip installs cleanly.

File Targets

Files the agent should modify:

  • .woodpecker.yaml -- change test step commands to use a venv

Files the agent should NOT touch:

  • .woodpecker.yaml build-and-push step -- only the test step needs fixing

Acceptance Criteria

  • When CI runs the test step, pip install succeeds without --break-system-packages
  • When CI runs the test step, ruff and pytest execute from the venv
  • The build-and-push step is unchanged

Test Expectations

  • Woodpecker pipeline passes on push to main
  • Run command: trigger pipeline after merge

Constraints

  • Only modify the test step commands
  • Use python -m venv /tmp/venv and prefix all commands with /tmp/venv/bin/
  • Do not add --break-system-packages -- venv is the proper fix

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-westside-basketball -- project this affects
### Lineage Standalone fix -- no plan ancestry. CI pipeline is broken and blocking all PRs. ### Repo `forgejo_admin/basketball-api` ### User Story As a developer I want the CI test step to install dependencies correctly So that tests actually run and PRs get validated ### Context The Woodpecker CI test step runs `pip install .[dev]` in a bare `python:3.12-slim` container. PEP 668 marks system Python as externally managed, so pip refuses to install without `--break-system-packages`. The package never installs and tests fail with `ModuleNotFoundError: No module named 'basketball_api'`. The fix is to create a venv in the test step so pip installs cleanly. ### File Targets Files the agent should modify: - `.woodpecker.yaml` -- change test step commands to use a venv Files the agent should NOT touch: - `.woodpecker.yaml` build-and-push step -- only the test step needs fixing ### Acceptance Criteria - [ ] When CI runs the test step, pip install succeeds without `--break-system-packages` - [ ] When CI runs the test step, ruff and pytest execute from the venv - [ ] The build-and-push step is unchanged ### Test Expectations - [ ] Woodpecker pipeline passes on push to main - Run command: trigger pipeline after merge ### Constraints - Only modify the test step commands - Use `python -m venv /tmp/venv` and prefix all commands with `/tmp/venv/bin/` - Do not add `--break-system-packages` -- venv is the proper fix ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-westside-basketball` -- project this affects
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/basketball-api#12
No description provided.