detached 126ed2b

ci: run the end-to-end tests of internal/app on main only (#52)

commit
126ed2b5ad266aee40fc8503b64784c73b0054a5
author
brice · · 2026-10-17 22:34 UTC
committer
bnema · · 2026-10-17 22:34 UTC
parent
3c3845e
signature
SSH UnverifiedSHA256:VOCA5lYARHcbKDZ7GhTV45VmcjWnJ6ZQIBazj17LivA The key is unknown
2 files · +10 -1
M .forgejo/workflows/ci.yml +8 -1
@@ -64,7 +64,14 @@ jobs:
6464 - name: Generated templ code is up to date
6565 run: scripts/templ-drift.sh
6666 - run: go vet ./...
67- - run: go test -race ./...
67+ # The end-to-end tests (internal/app, a real server per test) run before a
68+ # PR is opened (README, Build) and here on main only: they are most of the
69+ # time of a PR run.
70+ - name: Tests
71+ run: go test -race $(go list ./... | grep -vx 'bnema.dev/ermite/internal/app')
72+ - name: End-to-end tests
73+ if: github.event_name == 'push'
74+ run: go test -race ./internal/app/
6875 - name: Architecture
6976 run: go tool hexcheck -fail-on warn ./...
7077 # The core of the file finder (static/js/files.js) runs in Node.
@@ -64,7 +64,14 @@ jobs:
64 - name: Generated templ code is up to date64 - name: Generated templ code is up to date
65 run: scripts/templ-drift.sh65 run: scripts/templ-drift.sh
66 - run: go vet ./...66 - run: go vet ./...
67- - run: go test -race ./...67+ # The end-to-end tests (internal/app, a real server per test) run before a
68+ # PR is opened (README, Build) and here on main only: they are most of the
69+ # time of a PR run.
70+ - name: Tests
71+ run: go test -race $(go list ./... | grep -vx 'bnema.dev/ermite/internal/app')
72+ - name: End-to-end tests
73+ if: github.event_name == 'push'
74+ run: go test -race ./internal/app/
68 - name: Architecture75 - name: Architecture
69 run: go tool hexcheck -fail-on warn ./...76 run: go tool hexcheck -fail-on warn ./...
70 # The core of the file finder (static/js/files.js) runs in Node.77 # The core of the file finder (static/js/files.js) runs in Node.
M README.md +2 -0
@@ -202,6 +202,8 @@ go build ./cmd/ermite
202202 go test ./...
203203 ```
204204
205+`go test ./...` includes the end-to-end tests of `internal/app`, which start a real server per test. Run them before opening a pull request: CI runs them on `main` only, after the merge.
206+
205207 ## Architecture
206208
207209 `cmd/ermite` (entry point, calls `app.Run`) → `internal/app` (CLI and composition root: builds the adapters and wires them to the use cases) → `internal/usecase` (use cases), `internal/ports` (interfaces and parameter types that cross layers), `internal/domain` (pure values and rules) and `internal/adapters` (Git, KV store, HTTP, API, web, client implementations of the ports).
@@ -202,6 +202,8 @@ go build ./cmd/ermite
202 go test ./...202 go test ./...
203 ```203 ```
204 204
205+`go test ./...` includes the end-to-end tests of `internal/app`, which start a real server per test. Run them before opening a pull request: CI runs them on `main` only, after the merge.
206+
205 ## Architecture207 ## Architecture
206 208
207 `cmd/ermite` (entry point, calls `app.Run`) → `internal/app` (CLI and composition root: builds the adapters and wires them to the use cases) → `internal/usecase` (use cases), `internal/ports` (interfaces and parameter types that cross layers), `internal/domain` (pure values and rules) and `internal/adapters` (Git, KV store, HTTP, API, web, client implementations of the ports).209 `cmd/ermite` (entry point, calls `app.Run`) → `internal/app` (CLI and composition root: builds the adapters and wires them to the use cases) → `internal/usecase` (use cases), `internal/ports` (interfaces and parameter types that cross layers), `internal/domain` (pure values and rules) and `internal/adapters` (Git, KV store, HTTP, API, web, client implementations of the ports).

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 44

↑↓ moveenter openesc close