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.
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
pull_request_target, so the workflow file always comes frommainand a branch can't change what runs or where. The checkout names the PR head SHA explicitly, otherwise it would testmain.dejima-confined, in anode:22-bookwormcontainer. Node is there foractions/checkout, and Debian'spython3is 3.11, matching the Dockerfile.pull_request_targeta script in the repo would be missing from branches that predate it.torch/torchaudiofrom the PyTorch CPU index first, thenpip 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.pytest. The e2e test stays skipped becauseSONGTRACE_E2Eis unset..dejima/allowed-domainsNew 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
pull_request_targetreads the workflow frommain, which doesn't have it yet. The first run will be on the next PR after merge.sudo dejima-ci-allowlist render).test_web.pyfails intermittently until #18 is fixed, so CI will sometimes go red for that reason alone.Testing
bash -n.test_audio_io.pyandtest_separate.py. The exceptions are the #18 flakes andtest_version, which needs the package installed, as CI will do.