Files
skillshare/docker-compose.sandbox.yml
T
Willie 18a4177973 test: add online integration tests for install, update, and search
Cover real GitHub operations that were previously untested:
- install clone (subdir skill)
- install --track (full repo)
- update tracked repo (freshly cloned → up to date)
- search with conditional GITHUB_TOKEN skip

Also pass GITHUB_TOKEN into sandbox-online container and remove
the -run filter so all online-tagged tests run automatically.
2026-02-11 03:40:54 +08:00

61 lines
1.4 KiB
YAML

x-sandbox-common: &sandbox-common
build:
context: .
dockerfile: docker/sandbox/Dockerfile
working_dir: /workspace
environment:
GOCACHE: /go/build-cache
volumes:
- .:/workspace
- go-mod-cache:/go/pkg/mod
- go-build-cache:/go/build-cache
services:
sandbox-offline:
<<: *sandbox-common
profiles:
- offline
command:
- ./scripts/test.sh
network_mode: none
environment:
HOME: /tmp
GOCACHE: /go/build-cache
sandbox-online:
<<: *sandbox-common
profiles:
- online
command:
- ./scripts/test.sh
environment:
HOME: /tmp
GOCACHE: /go/build-cache
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
sandbox-playground:
<<: *sandbox-common
profiles:
- playground
command:
- sleep
- infinity
ports:
- "19420:19420"
environment:
HOME: /sandbox-home
GOCACHE: /go/build-cache
PATH: /sandbox-home/.local/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GITHUB_TOKEN: ${SKILLSHARE_PLAYGROUND_GITHUB_TOKEN:-}
volumes:
- .:/workspace:ro
- /workspace/internal/server/dist # writable overlay for go:embed (entrypoint copies UI assets here)
- go-mod-cache:/go/pkg/mod
- go-build-cache:/go/build-cache
- playground-home:/sandbox-home
volumes:
go-mod-cache:
go-build-cache:
playground-home: