try using docker hostnames
Some checks failed
Test / Run unit tests (pull_request) Failing after 1m54s
Test / Run integration tests (pull_request) Failing after 1h10m42s

This commit is contained in:
Roy Crihfield 2023-07-12 19:53:14 +08:00
parent 74db5052fa
commit 84b2a0874e

View File

@ -26,14 +26,15 @@ jobs:
git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/" git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"
- name: "Run DB container" - name: "Run DB container"
env: env:
DATABASE_HOSTNAME: 127.0.0.1 DATABASE_HOSTNAME: ipld-eth-db
DATABASE_PORT: 5432
run: | run: |
set -x set -x
docker compose -f test/compose.yml up --attach ipld-eth-db & docker compose -f test/compose.yml up --attach ipld-eth-db &
sleep 60 sleep 60
docker ps docker ps
apt-get update && apt-get install -y netcat apt-get update && apt-get install -y netcat
nc -v $DATABASE_HOSTNAME 8077 nc -v $DATABASE_HOSTNAME $DATABASE_PORT
go test -v ./... go test -v ./...
# - name: "Run tests" # - name: "Run tests"
# run: go test -v ./... # run: go test -v ./...