File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 integration :
3131 name : Integration tests
3232 runs-on : ubuntu-latest
33- services :
34- postgres :
35- image : postgres:13
36- env :
37- POSTGRES_USER : user
38- POSTGRES_PASSWORD : password
39- POSTGRES_DB : supersync
40- ports :
41- - 5432:5432
42- options : >-
43- --health-cmd="pg_isready"
44- --health-interval=10s
45- --health-timeout=5s
46- --health-retries=5
4733
4834 steps :
4935 - uses : actions/checkout@v4
5844 - name : Install dependencies
5945 run : composer install --prefer-dist --no-progress
6046
61- - name : Wait for PostgreSQL
62- run : |
63- for i in $(seq 1 30); do
64- if pg_isready -h localhost -p 5432 -U user -d supersync >/dev/null 2>&1; then
65- echo "PostgreSQL is ready"
66- exit 0
67- fi
68- sleep 1
69- done
70- echo "PostgreSQL did not start in time"
71- exit 1
72-
7347 - name : Start sync server
74- run : |
75- SERVICE_NETWORK=$(docker network ls --filter name=github_network --format '{{.Name}}' | head -1)
76- docker run -d \
77- --name sync-server \
78- --network "$SERVICE_NETWORK" \
79- -e DATABASE_URL="postgresql://user:password@postgres:5432/supersync" \
80- -e JWT_SECRET="85b62616ab5ce2aceac1f9191240207bab896dd8ccd84b45804a26095d19878b" \
81- -e NODE_ENV=development \
82- ghcr.io/johannesjo/supersync:latest
48+ run : docker compose up -d
8349
8450 - name : Wait for sync server
8551 run : |
9864
9965 - name : Cleanup sync server
10066 if : always()
101- run : docker rm -f sync-server
67+ run : docker compose down
You can’t perform that action at this time.
0 commit comments