ci: run the test suite on pull requests #22

Merged
branderson merged 1 commits from ci-tests into main 2026-10-10 19:32:43 -07:00
Collaborator

Summary generated by LLM agent

Adds a Gitea Actions workflow that runs the full test suite on pull requests. It follows Home Control's tests.yml.

Workflow

  • Trigger: pull_request_target, so the workflow file always comes from main and a branch can't change what runs or where. The checkout names the PR head SHA explicitly, otherwise it would test main.
  • Runner: dejima-confined, in a node:22-bookworm container. Node is there for actions/checkout, and Debian's python3 is 3.11, matching the Dockerfile.
  • Reachability check: an inline step checks the six hosts the job needs and explains how to fix the runner's allowlist if one is unreachable. It's inline because under pull_request_target a script in the repo would be missing from branches that predate it.
  • Install: CPU-only torch/torchaudio from the PyTorch CPU index first, then pip install -e '.[dev]', which finds torch already satisfied. This avoids several GB of CUDA libraries that no test uses. Neither demucs nor torchcrepe caps the torch version.
  • Tests: pytest. The e2e test stays skipped because SONGTRACE_E2E is unset.

.dejima/allowed-domains

New file listing the hosts the job needs: Debian's two mirrors, PyPI with its file host, and the PyTorch CPU index with download-r2.pytorch.org, which is where that index redirects its downloads. It also applies to dejima dev sandboxes for this project.

Before the first run

  • This PR can't run its own CI: pull_request_target reads the workflow from main, which doesn't have it yet. The first run will be on the next PR after merge.
  • The allowlist has to be rendered onto the runner after merge (sudo dejima-ci-allowlist render).
  • test_web.py fails intermittently until #18 is fixed, so CI will sometimes go red for that reason alone.

Testing

  • Checked locally that the workflow YAML parses and the inline shell passes bash -n.
  • The full suite passes locally with CPU torch, demucs and torchcrepe installed, including test_audio_io.py and test_separate.py. The exceptions are the #18 flakes and test_version, which needs the package installed, as CI will do.
  • The job itself hasn't run anywhere yet.
**Summary generated by LLM agent** Adds a Gitea Actions workflow that runs the full test suite on pull requests. It follows Home Control's `tests.yml`. ## Workflow - **Trigger:** `pull_request_target`, so the workflow file always comes from `main` and a branch can't change what runs or where. The checkout names the PR head SHA explicitly, otherwise it would test `main`. - **Runner:** `dejima-confined`, in a `node:22-bookworm` container. Node is there for `actions/checkout`, and Debian's `python3` is 3.11, matching the Dockerfile. - **Reachability check:** an inline step checks the six hosts the job needs and explains how to fix the runner's allowlist if one is unreachable. It's inline because under `pull_request_target` a script in the repo would be missing from branches that predate it. - **Install:** CPU-only `torch`/`torchaudio` from the PyTorch CPU index first, then `pip install -e '.[dev]'`, which finds torch already satisfied. This avoids several GB of CUDA libraries that no test uses. Neither demucs nor torchcrepe caps the torch version. - **Tests:** `pytest`. The e2e test stays skipped because `SONGTRACE_E2E` is unset. ## `.dejima/allowed-domains` New file listing the hosts the job needs: Debian's two mirrors, PyPI with its file host, and the PyTorch CPU index with `download-r2.pytorch.org`, which is where that index redirects its downloads. It also applies to dejima dev sandboxes for this project. ## Before the first run - This PR can't run its own CI: `pull_request_target` reads the workflow from `main`, which doesn't have it yet. The first run will be on the next PR after merge. - The allowlist has to be rendered onto the runner after merge (`sudo dejima-ci-allowlist render`). - `test_web.py` fails intermittently until #18 is fixed, so CI will sometimes go red for that reason alone. ## Testing - Checked locally that the workflow YAML parses and the inline shell passes `bash -n`. - The full suite passes locally with CPU torch, demucs and torchcrepe installed, including `test_audio_io.py` and `test_separate.py`. The exceptions are the #18 flakes and `test_version`, which needs the package installed, as CI will do. - The job itself hasn't run anywhere yet.
dejima-agent added 1 commit 2026-10-09 18:21:18 -07:00
Runs on pull_request_target so the workflow always comes from main, on the
confined runner tier. Installs CPU-only torch before the package so pip
does not pull the CUDA build, then runs pytest. .dejima/allowed-domains
declares the hosts the job fetches from.
branderson approved these changes 2026-10-10 19:32:39 -07:00
branderson merged commit e107596e84 into main 2026-10-10 19:32:43 -07:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: branderson/songtrace#22