Skip to content

Commit 59379b0

Browse files
authored
test: run the development environment steps in CI (#14025)
* test: run the development environment steps in CI Exercise some of our `Makefile`, `docker-compose.yml` and shell script wrapper utilities. Originally conceived in #10052, simplified with current commands. Closes #10052 Signed-off-by: Mike Fiedler <[email protected]> * Add a start_period to the db healthcheck Allow some time for the database to start up before performing "real" readiness checks. If the service is ready (healthcheck test command passes) during the start_period, it'll be considered healthy and continue. Refs: https://docs.docker.com/engine/reference/builder/#healthcheck:~:text=start%20period%20provides%20initialization%20time%20for%20containers%20that%20need,will%20be%20counted%20towards%20the%20maximum%20number%20of%20retries. Signed-off-by: Mike Fiedler <[email protected]> * only run on a schedule, and not part of PR/flow Signed-off-by: Mike Fiedler <[email protected]> --------- Signed-off-by: Mike Fiedler <[email protected]>
1 parent c2aa248 commit 59379b0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/dev-env-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Development Environment
2+
3+
on:
4+
schedule:
5+
- cron: '0 13 * * *' # once a day at around 9am eastern
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
# TODO: Should we test on other platforms like Windows and Mac?
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- run: make build
15+
- run: docker compose up -d
16+
- run: docker compose ps
17+
- run: make initdb
18+
- run: make tests

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ services:
3737
healthcheck:
3838
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
3939
interval: 1s
40+
start_period: 10s
4041

4142
stripe:
4243
image: stripe/stripe-mock:v0.162.0

0 commit comments

Comments
 (0)