Skip to content

Commit 684c063

Browse files
committed
Add health check on Meilisearch service container before running tests
1 parent 4bab7e5 commit 684c063

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ jobs:
3131
env:
3232
MEILI_ENV: development
3333
MEILI_NO_ANALYTICS: true
34+
options: >-
35+
--health-cmd "curl -f http://localhost:7700/health || exit 1"
36+
--health-interval 5s
37+
--health-timeout 5s
38+
--health-retries 10
3439
steps:
3540
- uses: actions/checkout@v4
3641
- uses: dtolnay/rust-toolchain@stable
3742
- uses: Swatinem/rust-cache@v2.7.8
3843
- run: cargo test
39-
env:
40-
MEILI_URL: http://localhost:7700

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ jobs:
3232
env:
3333
MEILI_ENV: development
3434
MEILI_NO_ANALYTICS: true
35+
options: >-
36+
--health-cmd "curl -f http://localhost:7700/health || exit 1"
37+
--health-interval 5s
38+
--health-timeout 5s
39+
--health-retries 10
3540
steps:
3641
- uses: actions/checkout@v4
3742
- uses: dtolnay/rust-toolchain@stable
3843
- uses: Swatinem/rust-cache@v2.7.8
3944
- run: cargo test
40-
env:
41-
MEILI_URL: http://localhost:7700
4245

4346
build:
4447
name: Build ${{ matrix.target }}

0 commit comments

Comments
 (0)