Skip to content

Commit 4d2d0aa

Browse files
committed
wip
1 parent 0e6e4fd commit 4d2d0aa

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/ci.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,11 @@ jobs:
379379
env:
380380
PGPORT: ${{ env.PGPORT }}
381381
run: |
382-
echo "DATABASE_URL=${{ steps.pg.outputs.connection-uri }}"
383-
echo "Print the same in base64 to bypass Github's obfuscation (uses hardcoded password):"
384-
echo "${{ steps.pg.outputs.connection-uri }}" | base64
382+
if [ "$RUNNER_OS" == "Linux" ]; then
383+
export DATABASE_URL="postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ env.PGPORT }}/${{ env.PGDATABASE }}?sslmode=require"
384+
else
385+
export PGSERVICE="${{ steps.pg.outputs.service-name }}"
386+
fi
385387
tests/fixtures/initdb.sh
386388
387389
- name: Copy static files
@@ -400,9 +402,12 @@ jobs:
400402
if [[ "${{ runner.os }}" != "Windows" ]]; then
401403
chmod +x "$MARTIN_BIN" "$MARTIN_CP_BIN" "$MBTILES_BIN"
402404
fi
405+
if [ "$RUNNER_OS" == "Linux" ]; then
406+
export DATABASE_URL="postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ env.PGPORT }}/${{ env.PGDATABASE }}?sslmode=require"
407+
else
408+
export PGSERVICE="${{ steps.pg.outputs.service-name }}"
409+
fi
403410
tests/test.sh
404-
env:
405-
DATABASE_URL: ${{ env.DATABASE_URL }}
406411
- name: Compare test output results (Linux)
407412
if: matrix.target == 'x86_64-unknown-linux-gnu'
408413
run: diff --brief --recursive --new-file tests/output tests/expected
@@ -422,7 +427,7 @@ jobs:
422427
export MBTILES_BIN=/usr/bin/mbtiles${{ matrix.ext }}
423428
tests/test.sh
424429
env:
425-
DATABASE_URL: ${{ env.DATABASE_URL }}
430+
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ env.PGPORT }}/${{ env.PGDATABASE }}?sslmode=require
426431
- name: Save test output (on error)
427432
if: failure()
428433
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)