Skip to content

Commit 4505bd7

Browse files
committed
ci: run nested plugin modules; align nested go versions
1 parent fabb764 commit 4505bd7

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/go.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,24 @@ jobs:
3838
go vet ./...
3939
fi
4040
41+
# Nested modules are not part of root `go test ./...` / `go build ./...` (separate go.mod).
42+
- name: Nested Go modules (plugin/sdk, plugin/examples/echo)
43+
run: |
44+
set -euo pipefail
45+
for dir in plugin/sdk plugin/examples/echo; do
46+
echo "::group::$dir"
47+
(cd "$dir" && go mod tidy && go build ./... && go test -race ./... && go vet ./...)
48+
echo "::endgroup::"
49+
done
50+
LINT="$(go env GOPATH)/bin/golangci-lint"
51+
if [ -x "$LINT" ]; then
52+
for dir in plugin/sdk plugin/examples/echo; do
53+
echo "::group::lint $dir"
54+
(cd "$dir" && "$LINT" run ./...)
55+
echo "::endgroup::"
56+
done
57+
fi
58+
4159
database-smoke:
4260
runs-on: ubuntu-latest
4361
services:

TESTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ Statement percentages below are from the merged profile (`go tool cover -func=co
329329

330330
The test suite is designed to run in CI/CD environments:
331331

332-
- **Default job** (`.github/workflows/go.yml` `build`): `go test -race ./...` on Ubuntu (SQLite only for DB tests; CI DB smoke tests skip without env).
332+
- **Default job** (`.github/workflows/go.yml` `build`): `go test -race ./...` on Ubuntu (SQLite only for DB tests; CI DB smoke tests skip without env), then **`plugin/sdk`** and **`plugin/examples/echo`** each run `go mod tidy`, `go build ./...`, `go test -race ./...`, `go vet ./...`, and **`golangci-lint run ./...`** when the linter was installed for the root job (nested modules use their own `go.mod` and are not included in root `./...`).
333333
- **Database smoke job** (`database-smoke`): Postgres 16 and MySQL 8 services, then `go test -race ./server -run 'Test(Postgres|MySQL)InitDBAndSchemaSmoke'` with `MARCHAT_CI_POSTGRES_URL` / `MARCHAT_CI_MYSQL_URL` set.
334334
- **Parallel Safe**: Standard tests avoid shared mutable global state; subprocess tests serialize via their own `go run` invocations.
335335
- **Deterministic**: Doctor subprocess tests set `MARCHAT_DOCTOR_NO_NETWORK=1` to avoid GitHub API flakiness.

plugin/examples/echo/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/Cod-e-Codes/marchat/plugins/echo
22

3-
go 1.21
3+
go 1.25.9
44

55
require github.com/Cod-e-Codes/marchat/plugin/sdk v0.0.0
66

plugin/sdk/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/Cod-e-Codes/marchat/plugin/sdk
22

3-
go 1.21
3+
go 1.25.9

0 commit comments

Comments
 (0)