Skip to content

ci: run docker-backed tests as a separate pull request job - #39

Closed
agentHits wants to merge 4 commits into
AgentHits-Devfrom
ci/split-real-tests
Closed

agentHits wants to merge 4 commits into
AgentHits-Devfrom
ci/split-real-tests

Conversation

@agentHits

Copy link
Copy Markdown
Collaborator

What:

  • *.real.test.ts (real Docker, ~3 min) moved into a separate test-real
    matrix job; the test job runs the remaining tests.
  • Nixpacks/Railpack install and swarm init now run only in test-real.
  • Check names stay pr-check ().
    Why:
  • test-real runs in parallel with build, test and typecheck on a third Mac
    mini runner, so PR checks finish sooner.
    Risks:
  • pr-check (test-real) is a new check name; keep that in mind if checks
    ever become required.
    Checks:
  • Commands and results: locally bun run test -- real.test.ts selects exactly
    2 files; --exclude "**/*.real.test.ts" reaches vitest.
  • Limitations: the full run happens in this PR's CI.

Built on top of #38; until #38 is merged this PR also shows its two commits.

🤖 Generated with Claude Code

agentHits and others added 4 commits October 7, 2026 08:35
Что:
- Проверки PR (audit, build, test, typecheck) для PR владельца из этого
  репозитория идут на self-hosted раннерах с меткой dokploy-ci.
- PR из форков и от других авторов остаются на ubuntu-latest.
- Nixpacks/Railpack ставятся только на GitHub-раннерах; swarm init
  пропускается, если swarm уже активен.
- Добавлены concurrency по номеру PR и timeout-minutes: 30.
Зачем:
- На раннерах GitHub проверки идут около 5 минут; на Mac mini
  install/typecheck/build/test быстрее за счёт тёплого кэша.
Риски:
- Репозиторий публичный: PR из форка может переписать runs-on, поэтому
  в настройках включено одобрение запусков для всех внешних участников.
- Тесты делят Docker (OrbStack) на Mac mini с другими нагрузками.
Проверки:
- Команды и результаты: на Mac mini bun install (тёплый кэш) 15 с,
  typecheck 12 с, build 82 с, unit-тесты 69 с; итоговый прогон - в этом PR.
- Ограничения: сборка Docker-образа остаётся на GitHub (amd64 под
  эмуляцией на Mac mini медленнее: 18 мин с нуля).

What:
- PR checks (audit, build, test, typecheck) for the owner's PRs from this
  repository run on self-hosted runners labelled dokploy-ci.
- Fork PRs and PRs by other authors stay on ubuntu-latest.
- Nixpacks/Railpack are installed only on GitHub runners; swarm init is
  skipped when the swarm is already active.
- Added per-PR concurrency and timeout-minutes: 30.
Why:
- On GitHub runners the checks take about 5 minutes; on the Mac mini
  install/typecheck/build/test are faster with a warm cache.
Risks:
- The repository is public: a fork PR can rewrite runs-on, so the repo now
  requires approval for runs from every outside contributor.
- Tests share Docker (OrbStack) on the Mac mini with other workloads.
Checks:
- Commands and results: on the Mac mini bun install (warm cache) 15 s,
  typecheck 12 s, build 82 s, unit tests 69 s; full run happens in this PR.
- Limitations: the Docker image build stays on GitHub (amd64 under emulation
  on the Mac mini is slower: 18 min from scratch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Что:
- Тесту "covers every super password event with no secrets in the payloads"
  дан таймаут 30 с вместо стандартных 5 с.
Зачем:
- В тесте около 20 вызовов bcrypt; на Mac mini, когда все ядра заняты
  воркерами vitest и next build, он стабильно не укладывался в 5 с, а
  следующий тест падал каскадом с "duplicate key in super_password".
Риски:
- Не выявлены: меняется только таймаут теста.
Проверки:
- Команды и результаты: bun run test -- --run
  __test__/security/super-password-alerts.test.ts - 10/10; biome check - ок.
- Ограничения: полный прогон - в CI этого PR.

What:
- The test "covers every super password event with no secrets in the
  payloads" gets a 30 s timeout instead of the default 5 s.
Why:
- It runs about 20 bcrypt calls; on the Mac mini, with every core busy with
  vitest workers and next build, it kept missing 5 s, and the next test then
  failed in cascade with "duplicate key in super_password".
Risks:
- None identified: only the test timeout changes.
Checks:
- Commands and results: bun run test -- --run
  __test__/security/super-password-alerts.test.ts - 10/10; biome check - ok.
- Limitations: the full run happens in this PR's CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Что:
- Тесты *.real.test.ts (настоящий Docker, ~3 мин) вынесены в отдельную
  задачу матрицы test-real; задача test запускает остальные тесты.
- Установка Nixpacks/Railpack и инициализация swarm теперь только в
  test-real.
- Имена проверок остаются вида pr-check (<job>).
Зачем:
- test-real идёт параллельно с build, test и typecheck на третьем
  раннере Mac mini, общая длительность проверок PR сокращается.
Риски:
- Проверка pr-check (test-real) новая; если её когда-нибудь сделают
  обязательной, это надо учесть.
Проверки:
- Команды и результаты: локально bun run test -- real.test.ts выбирает
  ровно 2 файла; --exclude "**/*.real.test.ts" доходит до vitest.
- Ограничения: полный прогон - в CI этого PR.

What:
- *.real.test.ts (real Docker, ~3 min) moved into a separate test-real
  matrix job; the test job runs the remaining tests.
- Nixpacks/Railpack install and swarm init now run only in test-real.
- Check names stay pr-check (<job>).
Why:
- test-real runs in parallel with build, test and typecheck on a third Mac
  mini runner, so PR checks finish sooner.
Risks:
- pr-check (test-real) is a new check name; keep that in mind if checks
  ever become required.
Checks:
- Commands and results: locally bun run test -- real.test.ts selects exactly
  2 files; --exclude "**/*.real.test.ts" reaches vitest.
- Limitations: the full run happens in this PR's CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l-tests

# Conflicts:
#	.github/workflows/pull-request.yml
@agentHits

Copy link
Copy Markdown
Collaborator Author

Closing without merge: measured on the Mac mini, splitting the Docker-backed tests did not shorten the run (4m48s on 3 runners, 5m15s on 2, vs 4m33s before). The real fix is in a follow-up PR: cheaper builds in those tests.

@agentHits agentHits closed this Oct 7, 2026
@agentHits
agentHits deleted the ci/split-real-tests branch October 7, 2026 14:17
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