From b6bd4f26c5192e31adab56de83a83716a1ff3f55 Mon Sep 17 00:00:00 2001 From: farreldarian Date: Sun, 24 Dec 2023 23:32:55 +0700 Subject: [PATCH] Try port mapping --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1d12bb..37a6bd3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,8 @@ jobs: MYSQL_DATABASE: testdb MYSQL_USER: testuser MYSQL_PASSWORD: testpassword + ports: + - 3306:3306 postgres: image: postgres @@ -25,6 +27,8 @@ jobs: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: testdb + ports: + - 5432:5432 steps: - uses: actions/checkout@v4 @@ -37,7 +41,7 @@ jobs: - name: Set environment variables run: | - echo "PG_DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" >> $GITHUB_ENV - echo "MYSQL_DATABASE_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@127.0.0.1:3306/$MYSQL_DATABASE" >> $GITHUB_ENV + echo "PG_DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@0.0.0.0:5432/$POSTGRES_DB" >> $GITHUB_ENV + echo "MYSQL_DATABASE_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@0.0.0.0:3306/$MYSQL_DATABASE" >> $GITHUB_ENV - name: Test run: turbo test