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
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:
1 parent
b93cfea5b3
commit
fe95f59fc8
6 files changed
+39
-12
No files matched your search
@@ -11,3 +11,4 @@ tests
|
||||
docs
|
||||
deploy/grafana
|
||||
deploy/prometheus
|
||||
# (scripts/interop is used by the interop driver image)
|
||||
+20
-4
@@ -77,10 +77,26 @@ jobs:
|
||||
- name: Dashboards are valid JSON
|
||||
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) -------------------------------------
|
||||
|
||||
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'))
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@@ -123,7 +139,7 @@ jobs:
|
||||
run: docker logout "${{ vars.PKGS_HOST }}" || true
|
||||
|
||||
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'))
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -147,7 +163,7 @@ jobs:
|
||||
done
|
||||
|
||||
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')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -164,7 +180,7 @@ jobs:
|
||||
--username api --password "${{ secrets.PKGS_API_KEY }}"
|
||||
|
||||
notify:
|
||||
needs: [lint, test, validate-monitoring, images, assets, python-package]
|
||||
needs: [lint, test, validate-monitoring, federation-interop, images, assets, python-package]
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -22,11 +22,12 @@ networks:
|
||||
fedi:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.30.0.0/24
|
||||
- subnet: ${INTEROP_SUBNET:-172.30.0.0/24}
|
||||
|
||||
services:
|
||||
db:
|
||||
ports: !reset []
|
||||
volumes: !reset [db-data:/var/lib/postgresql/data] # no bind mounts (CI)
|
||||
networks: [fedi]
|
||||
|
||||
api:
|
||||
@@ -62,9 +63,9 @@ services:
|
||||
GTS_PORT: "80"
|
||||
GTS_DB_TYPE: sqlite
|
||||
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_TRUSTED_PROXIES: 172.30.0.0/24
|
||||
GTS_TRUSTED_PROXIES: ${INTEROP_SUBNET:-172.30.0.0/24}
|
||||
GTS_ACCOUNTS_REGISTRATION_OPEN: "false"
|
||||
GTS_LOG_LEVEL: ${GTS_LOG_LEVEL:-info}
|
||||
sysctls:
|
||||
@@ -74,9 +75,10 @@ services:
|
||||
aliases: [gts.test]
|
||||
|
||||
driver:
|
||||
image: python:3.13-slim
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deploy/interop/driver.Dockerfile
|
||||
profiles: [driver]
|
||||
volumes:
|
||||
- ./scripts/interop:/interop:ro # relative to the project (first compose file)
|
||||
command: ["python", "/interop/gotosocial_interop.py"]
|
||||
environment:
|
||||
GTS_REJECT_ENDS_FOLLOWS: ${GTS_REJECT_ENDS_FOLLOWS:-0}
|
||||
networks: [fedi]
|
||||
@@ -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"]
|
||||
@@ -2,4 +2,6 @@
|
||||
# docker compose for the federation interop stack (Scrobbler + GoToSocial).
|
||||
set -euo pipefail
|
||||
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" "$@"
|
||||
@@ -24,6 +24,7 @@ echo "==> Creating the GoToSocial test user"
|
||||
--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" build driver >/dev/null
|
||||
"$compose" run --rm driver
|
||||
status=$?
|
||||
if [ $status -ne 0 ]; then
|
||||
|
||||
Reference in new issue
Block a user