Skip to content

Commit ba90ecd

Browse files
committed
Try accessing service by name and static port
1 parent 12f2a9b commit ba90ecd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/testing.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ jobs:
1313

1414
services:
1515
postgres:
16-
image: postgres:9.6-alpine
17-
ports:
18-
- "5432"
16+
image: postgres:9.6
1917
env:
2018
POSTGRES_USER: test
2119
POSTGRES_PASSWORD: test
@@ -35,7 +33,7 @@ jobs:
3533
if: success()
3634
run: go test -timeout 60s -cover ./... -coverprofile=coverage.txt -covermode=atomic
3735
env:
38-
PG_URI: "postgres://test:test@localhost:${{ job.services.postgres.ports[5432] }}/test?sslmode=disable"
36+
PG_URI: "postgres://test:test@postgres:5432/test?sslmode=disable"
3937

4038
- name: Upload coverage to Codecov
4139
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)