CI: run the GoToSocial interop test
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 13s
CI / federation-interop (push) Successful in 1m9s
CI / test (push) Successful in 2m11s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 6s

A federation-interop job runs scripts/interop/run.sh on every push
(not for pull requests from forks), with a per-run compose project and
subnet so concurrent runs can't collide. Publishing waits for it too.

The driver is now an image with the script baked in, and the interop
overlay avoids bind mounts, since CI jobs drive the host's Docker from
inside a container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 22:13:12 +01:00
1 parent b93cfea5b3
commit fe95f59fc8
6 files changed
+39 -12

No files matched your search

+1
View File
@@ -11,3 +11,4 @@ tests
docs docs
deploy/grafana deploy/grafana
deploy/prometheus deploy/prometheus
# (scripts/interop is used by the interop driver image)
+20 -4
View File
@@ -77,10 +77,26 @@ jobs:
- name: Dashboards are valid JSON - name: Dashboards are valid JSON
run: for f in deploy/grafana/dashboards/*.json; do python3 -m json.tool "$f" > /dev/null; done run: for f in deploy/grafana/dashboards/*.json; do python3 -m json.tool "$f" > /dev/null; done
federation-interop:
# A real GoToSocial server follows a Scrobbler user (see scripts/interop/run.sh).
# Not for pull requests from forks: it runs containers on the runner's Docker.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Scrobbler <-> GoToSocial
env:
INTEROP_PROJECT: interop-${{ github.run_id }}
run: |
# A subnet of its own, so concurrent runs can't collide
export INTEROP_SUBNET="172.30.$(( ${{ github.run_number }} % 200 + 20 )).0/24"
scripts/interop/run.sh
# ---- Publishing (main and v* tags only) ------------------------------------- # ---- Publishing (main and v* tags only) -------------------------------------
images: images:
needs: [lint, test, validate-monitoring] needs: [lint, test, validate-monitoring, federation-interop]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
@@ -123,7 +139,7 @@ jobs:
run: docker logout "${{ vars.PKGS_HOST }}" || true run: docker logout "${{ vars.PKGS_HOST }}" || true
assets: assets:
needs: [lint, test, validate-monitoring] needs: [lint, test, validate-monitoring, federation-interop]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -147,7 +163,7 @@ jobs:
done done
python-package: python-package:
needs: [lint, test, validate-monitoring] needs: [lint, test, validate-monitoring, federation-interop]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -164,7 +180,7 @@ jobs:
--username api --password "${{ secrets.PKGS_API_KEY }}" --username api --password "${{ secrets.PKGS_API_KEY }}"
notify: notify:
needs: [lint, test, validate-monitoring, images, assets, python-package] needs: [lint, test, validate-monitoring, federation-interop, images, assets, python-package]
if: always() if: always()
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
+9 -7
View File
@@ -22,11 +22,12 @@ networks:
fedi: fedi:
ipam: ipam:
config: config:
- subnet: 172.30.0.0/24 - subnet: ${INTEROP_SUBNET:-172.30.0.0/24}
services: services:
db: db:
ports: !reset [] ports: !reset []
volumes: !reset [db-data:/var/lib/postgresql/data] # no bind mounts (CI)
networks: [fedi] networks: [fedi]
api: api:
@@ -62,9 +63,9 @@ services:
GTS_PORT: "80" GTS_PORT: "80"
GTS_DB_TYPE: sqlite GTS_DB_TYPE: sqlite
GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db
GTS_HTTP_CLIENT_ALLOW_IPS: 172.30.0.0/24 # let it reach Scrobbler on this network GTS_HTTP_CLIENT_ALLOW_IPS: ${INTEROP_SUBNET:-172.30.0.0/24} # let it reach Scrobbler on this network
GTS_HTTP_CLIENT_TLS_INSECURE_SKIP_VERIFY: "true" # Caddy's throwaway certificate GTS_HTTP_CLIENT_TLS_INSECURE_SKIP_VERIFY: "true" # Caddy's throwaway certificate
GTS_TRUSTED_PROXIES: 172.30.0.0/24 GTS_TRUSTED_PROXIES: ${INTEROP_SUBNET:-172.30.0.0/24}
GTS_ACCOUNTS_REGISTRATION_OPEN: "false" GTS_ACCOUNTS_REGISTRATION_OPEN: "false"
GTS_LOG_LEVEL: ${GTS_LOG_LEVEL:-info} GTS_LOG_LEVEL: ${GTS_LOG_LEVEL:-info}
sysctls: sysctls:
@@ -74,9 +75,10 @@ services:
aliases: [gts.test] aliases: [gts.test]
driver: driver:
image: python:3.13-slim build:
context: .
dockerfile: deploy/interop/driver.Dockerfile
profiles: [driver] profiles: [driver]
volumes: environment:
- ./scripts/interop:/interop:ro # relative to the project (first compose file) GTS_REJECT_ENDS_FOLLOWS: ${GTS_REJECT_ENDS_FOLLOWS:-0}
command: ["python", "/interop/gotosocial_interop.py"]
networks: [fedi] networks: [fedi]
+5
View File
@@ -0,0 +1,5 @@
# The interop test driver: the script baked in (CI runners can't bind-mount the workspace
# into sibling containers).
FROM python:3.13-slim
COPY scripts/interop/gotosocial_interop.py /interop/gotosocial_interop.py
CMD ["python", "/interop/gotosocial_interop.py"]
+3 -1
View File
@@ -2,4 +2,6 @@
# docker compose for the federation interop stack (Scrobbler + GoToSocial). # docker compose for the federation interop stack (Scrobbler + GoToSocial).
set -euo pipefail set -euo pipefail
root="$(cd "$(dirname "$0")/../.." && pwd)" root="$(cd "$(dirname "$0")/../.." && pwd)"
exec docker compose -f "$root/docker-compose.yml" -f "$root/deploy/interop/docker-compose.interop.yml" "$@" # INTEROP_PROJECT and INTEROP_SUBNET let concurrent runs (e.g. in CI) stay apart.
exec docker compose -p "${INTEROP_PROJECT:-scrobbler-interop}" \
-f "$root/docker-compose.yml" -f "$root/deploy/interop/docker-compose.interop.yml" "$@"
+1
View File
@@ -24,6 +24,7 @@ echo "==> Creating the GoToSocial test user"
--username gtsuser --email gtsuser@gts.test --password 'Interop-Test-Password-1' >/dev/null --username gtsuser --email gtsuser@gts.test --password 'Interop-Test-Password-1' >/dev/null
"$compose" exec -T gotosocial /gotosocial/gotosocial admin account confirm --username gtsuser >/dev/null "$compose" exec -T gotosocial /gotosocial/gotosocial admin account confirm --username gtsuser >/dev/null
"$compose" build driver >/dev/null
"$compose" run --rm driver "$compose" run --rm driver
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then