Skip to content

Commit 430ac8c

Browse files
committed
use gha native services
1 parent db28400 commit 430ac8c

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

.github/workflows/test.yaml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ jobs:
6060
needs: lint-build
6161
steps:
6262
- uses: actions/checkout@v3
63-
- name: Build the docker-compose stack
64-
env:
65-
PG_USER: ci_db_user
66-
PG_PASS: ci_db_pass
67-
run: docker-compose -f docker/docker-compose-ci.yml up -d
68-
- name: Check running containers
69-
run: docker ps
7063
- uses: actions/setup-node@v3
7164
with:
7265
node-version: 18
@@ -90,6 +83,28 @@ jobs:
9083
with:
9184
key: nyc-postgres-${{ github.sha }}
9285
path: ${{ github.workspace }}/.nyc_output
86+
services:
87+
redis:
88+
image: redis:alpine
89+
ports:
90+
- 6379:6379
91+
options: >-
92+
--health-cmd "redis-cli ping"
93+
--health-interval 10s
94+
--health-timeout 5s
95+
--health-retries 5
96+
postgres:
97+
image: postgres:alpine
98+
ports:
99+
- 5432:5432
100+
options: >-
101+
--health-cmd pg_isready
102+
--health-interval 10s
103+
--health-timeout 5s
104+
--health-retries 5
105+
env:
106+
POSTGRES_USER: ci_db_user
107+
POSTGRES_PASSWORD: ci_db_pass
93108
codecov:
94109
needs: [test-sqlite, test-postgres]
95110
name: Run Codecov

docker/docker-compose-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ services:
44
container_name: database-co
55
image: postgres:alpine
66
environment:
7-
- POSTGRES_USER=${PG_USER}
8-
- POSTGRES_PASSWORD=${PG_PASS}
7+
- POSTGRES_USER=ci_db_user
8+
- POSTGRES_PASSWORD=ci_db_pass
99
ports:
1010
- 5432:5432
1111
redis:

0 commit comments

Comments
 (0)