Skip to content

Commit 183133e

Browse files
authored
Upgrade to Go 1.27 and standardize CI badges (#22)
* Upgrade to Go 1.27 and standardize CI badges * Translate container names for Podman log assertions
1 parent db7483d commit 183133e

7 files changed

Lines changed: 20 additions & 14 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Integration Test
22
run-name: "Integration Test (${{ inputs.fmsgd_ref }})"
33

44
on:
5+
push:
6+
branches: [main]
57
pull_request:
68
branches: [main]
79
workflow_dispatch:
@@ -23,16 +25,19 @@ on:
2325
required: false
2426
default: 'main'
2527

28+
permissions:
29+
contents: read
30+
2631
jobs:
2732
integration-test:
2833
runs-on: ubuntu-latest
2934

3035
steps:
31-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v7
3237

33-
- uses: actions/setup-go@v5
38+
- uses: actions/setup-go@v7
3439
with:
35-
go-version: "stable"
40+
go-version: "1.27.x"
3641

3742
- name: Select component refs
3843
id: refs

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Integration Test](https://github.com/markmnl/fmsg-docker/actions/workflows/integration-test.yml/badge.svg)](https://github.com/markmnl/fmsg-docker/actions/workflows/integration-test.yml)
1+
[![Integration Test](https://github.com/markmnl/fmsg-docker/actions/workflows/integration-test.yml/badge.svg?branch=main)](https://github.com/markmnl/fmsg-docker/actions/workflows/integration-test.yml?query=branch%3Amain)
2+
[![Go 1.27+](https://img.shields.io/badge/Go-1.27%2B-00ADD8?logo=go&logoColor=white)](https://go.dev/dl/)
23

34
# fmsg-docker
45

@@ -137,7 +138,7 @@ The compose stack uses Docker named volumes:
137138

138139
End-to-end tests that spin up two full stacks (`hairpin.local` and `example.com`) on a shared Docker network and exchange messages between them using [fmsg-cli](https://github.com/markmnl/fmsg-cli). Test 008 drives [fmsg-mcp-claude](https://github.com/markmnl/fmsg-mcp-claude) over stdio and test 014 drives [fmsg-mcp](https://github.com/markmnl/fmsg-mcp) over Streamable HTTP (`FMSG_MCP_NPM_SPEC` picks the version, default `@markmnl/fmsg-mcp@latest`). The test runner enables fmsg-webapi API-key auth, creates delegated API keys for the test actors during setup, and passes them to fmsg-cli with `FMSG_API_KEY`.
139140

140-
**Prerequisites:** Docker, docker compose, Go 1.24+, curl, jq, Node.js 22+ (test 014 runs the published `@markmnl/fmsg-mcp` with `npx`).
141+
**Prerequisites:** Docker, docker compose, Go 1.27+, curl, jq, Node.js 22+ (test 014 runs the published `@markmnl/fmsg-mcp` with `npx`).
141142

142143
```bash
143144
# Run tests (starts stacks fresh)

docker/fmsg-webapi/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25 AS builder
1+
FROM golang:1.27 AS builder
22

33
ARG FMSG_WEBAPI_REF=main
44
ARG CACHEBUST

docker/fmsgd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25 AS builder
1+
FROM golang:1.27 AS builder
22

33
ARG FMSGD_REF=main
44
ARG CACHEBUST

docker/fmsgid/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25 AS builder
1+
FROM golang:1.27 AS builder
22

33
ARG FMSGID_REF=main
44
ARG CACHEBUST

test/run-tests-podman.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# =============================================================
33
# Run the fmsg integration tests using podman instead of docker.
44
#
5-
# Prerequisites: podman, podman-compose (or docker-compose) go (1.24+), curl
5+
# Prerequisites: podman, podman-compose (or docker-compose) go (1.27+), curl
66
#
77
# This shims a `docker` executable onto PATH that execs podman, then
88
# delegates straight to run-tests.sh so the two runners stay in sync.
@@ -29,8 +29,8 @@
2929
# podman-compose also names containers "<project>_<service>_<index>"
3030
# (underscores) whereas docker compose v2 names them
3131
# "<project>-<service>-<index>" (hyphens). run-tests.sh hardcodes the
32-
# docker-compose-v2-style names for `docker exec` targets, so the shim
33-
# rewrites those to podman-compose's naming for that subcommand only.
32+
# docker-compose-v2-style names for `docker exec` and `docker logs` targets,
33+
# so the shim rewrites those to podman-compose's naming for both subcommands.
3434
#
3535
# Usage: same as run-tests.sh, e.g.
3636
# ./test/run-tests-podman.sh
@@ -117,7 +117,7 @@ cat > "$SHIM_DIR/docker" <<EOF
117117
set -euo pipefail
118118
119119
args=("\$@")
120-
if [ "\${1:-}" = "exec" ]; then
120+
if [ "\${1:-}" = "exec" ] || [ "\${1:-}" = "logs" ]; then
121121
for i in "\${!args[@]}"; do
122122
if [[ "\${args[\$i]}" != -* ]] && [ "\$i" != "0" ]; then
123123
name="\${args[\$i]}"

test/run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# =============================================================
33
# Run the fmsg integration tests.
44
#
5-
# Prerequisites: docker, docker compose, go (1.24+), curl
5+
# Prerequisites: docker, docker compose, go (1.27+), curl
66
#
77
# Usage:
88
# ./test/run-tests.sh # run tests (start stacks fresh)
@@ -252,7 +252,7 @@ if [ "$SKIP_START" != "true" ]; then
252252
echo "==> Ensuring public base images are available..."
253253
# Fully-qualified names: podman's short-name resolution wants a TTY prompt
254254
# when an alias is missing, which kills non-interactive runs.
255-
for image in docker.io/library/debian:bookworm-slim docker.io/library/golang:1.25 docker.io/library/postgres:18-alpine docker.io/certbot/certbot:latest; do
255+
for image in docker.io/library/debian:bookworm-slim docker.io/library/golang:1.27 docker.io/library/postgres:18-alpine docker.io/certbot/certbot:latest; do
256256
if ! docker image inspect "$image" >/dev/null 2>&1; then
257257
docker pull "$image"
258258
fi

0 commit comments

Comments
 (0)