feat: add Forgejo Actions CI pipeline #56

Open
ariejan wants to merge 9 commits from feat/ci-forgejo-actions into master
Owner

Summary

Implements #6 — Forgejo Actions CI pipeline.

  • .forgejo/workflows/ci.yml mirrors the existing GH workflow (scan_ruby, scan_js, lint, test) and adds a test:system step
  • Gem caching via ruby/setup-ruby@v1 with bundler-cache: true; RuboCop cache preserved
  • test job joins the envoy_default compose network so jobs reach Dovecot + MailHog by hostname
  • docker-compose.test.yml defines Dovecot 2.4 + MailHog, with config under test/integration/support/dovecot/
  • test/integration_test_helper.rb skips when services are unreachable, so bin/rails test stays green locally without the compose stack
  • Smoke tests: IMAP login/LIST against Dovecot, SMTP delivery verified via MailHog HTTP API

Test plan

  • bin/rails test with compose up — 2 runs, 4 assertions, 0 skips
  • bin/rails test without compose — 2 skips, no errors
  • bin/rubocop clean
  • Forgejo Actions runs green on this PR
## Summary Implements #6 — Forgejo Actions CI pipeline. - `.forgejo/workflows/ci.yml` mirrors the existing GH workflow (`scan_ruby`, `scan_js`, `lint`, `test`) and adds a `test:system` step - Gem caching via `ruby/setup-ruby@v1` with `bundler-cache: true`; RuboCop cache preserved - `test` job joins the `envoy_default` compose network so jobs reach Dovecot + MailHog by hostname - `docker-compose.test.yml` defines Dovecot 2.4 + MailHog, with config under `test/integration/support/dovecot/` - `test/integration_test_helper.rb` skips when services are unreachable, so `bin/rails test` stays green locally without the compose stack - Smoke tests: IMAP login/LIST against Dovecot, SMTP delivery verified via MailHog HTTP API ## Test plan - [x] `bin/rails test` with compose up — 2 runs, 4 assertions, 0 skips - [x] `bin/rails test` without compose — 2 skips, no errors - [x] `bin/rubocop` clean - [ ] Forgejo Actions runs green on this PR
feat: add Forgejo Actions CI pipeline (#6)
Some checks failed
CI / scan_ruby (pull_request) Failing after 1m7s
CI / lint (pull_request) Failing after 1m8s
CI / scan_js (pull_request) Failing after 1m8s
CI / test (pull_request) Failing after 1m19s
38dcb238f5
Ports the existing GitHub Actions workflow to .forgejo/workflows/ci.yml
and adds the Dovecot + MailHog services needed by the integration suite.

- docker-compose.test.yml with Dovecot 2.4 + MailHog, config under
  test/integration/support/dovecot
- IntegrationTestCase skips when services are unreachable so local
  `bin/rails test` works without the compose stack up
- Smoke tests for IMAP login and SMTP delivery against the containers
- CI caches gems via ruby/setup-ruby and joins the compose network so
  services are reachable by hostname

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(ci): pin Forgejo action refs to full github.com URLs
Some checks failed
CI / scan_js (pull_request) Successful in 2m54s
CI / scan_ruby (pull_request) Successful in 2m58s
CI / lint (pull_request) Successful in 3m18s
CI / test (pull_request) Failing after 1s
46edcf833c
Forgejo Actions does not resolve short `actions/checkout@v4` style refs
by default — needs the explicit registry URL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(ci): skip integration services if runner lacks Docker
Some checks failed
CI / scan_js (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 30s
CI / scan_ruby (pull_request) Successful in 33s
CI / test (pull_request) Failing after 43s
820486663e
Runner without docker socket cannot bring up the Dovecot + MailHog
compose stack. Detect the situation and skip the compose step; the
IntegrationTestCase helper already skips tests when services are
unreachable, so the unit + system suites still run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(ci): run PostgreSQL inside the job container
Some checks failed
CI / scan_js (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 28s
CI / scan_ruby (pull_request) Successful in 34s
CI / test (pull_request) Failing after 36s
bd95c519dd
Runner does not provision `services:` containers with resolvable DNS,
so the `postgres` hostname fails. Install and start PostgreSQL inside
the job container and connect via 127.0.0.1 instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Update .forgejo/workflows/ci.yml
Some checks failed
CI / scan_js (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 29s
CI / scan_ruby (pull_request) Successful in 32s
CI / test (pull_request) Failing after 35s
b38e8bf99e
Update .forgejo/workflows/ci.yml
Some checks failed
CI / scan_js (pull_request) Successful in 1m30s
CI / lint (pull_request) Successful in 1m35s
CI / scan_ruby (pull_request) Successful in 1m37s
CI / test (pull_request) Failing after 1m11s
8c92a75a00
Fix ci, hopefully
Some checks failed
CI / scan_js (pull_request) Successful in 26s
CI / lint (pull_request) Successful in 29s
CI / scan_ruby (pull_request) Successful in 33s
CI / test (pull_request) Failing after 46s
b5851145b6
fix(ci): build dovecot image instead of bind-mounting config
Some checks failed
CI / scan_js (pull_request) Successful in 26s
CI / lint (pull_request) Successful in 30s
CI / scan_ruby (pull_request) Successful in 33s
CI / test (pull_request) Failing after 52s
f0c97ca5fc
docker compose standalone converts configs/volumes bind-mounts using
source paths. In DinD (or any CI-in-container), those paths live in
the job container's workspace volume and can't be resolved by the
daemon. Building a custom image sends the context as a tarball, which
works identically on local Mac and in CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(ci): use COPY --chmod in dovecot image build
All checks were successful
CI / scan_js (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 28s
CI / scan_ruby (pull_request) Successful in 32s
CI / test (pull_request) Successful in 1m11s
1f71fa72ad
Dovecot base image has no /bin/chmod. Use BuildKit's COPY --chmod
to set permissions at copy time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
All checks were successful
CI / scan_js (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 28s
CI / scan_ruby (pull_request) Successful in 32s
CI / test (pull_request) Successful in 1m11s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/ci-forgejo-actions:feat/ci-forgejo-actions
git switch feat/ci-forgejo-actions

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff feat/ci-forgejo-actions
git switch feat/ci-forgejo-actions
git rebase master
git switch master
git merge --ff-only feat/ci-forgejo-actions
git switch feat/ci-forgejo-actions
git rebase master
git switch master
git merge --no-ff feat/ci-forgejo-actions
git switch master
git merge --squash feat/ci-forgejo-actions
git switch master
git merge --ff-only feat/ci-forgejo-actions
git switch master
git merge feat/ci-forgejo-actions
git push origin master
Sign in to join this conversation.
No description provided.