Skip to content

Commit c68fbc1

Browse files
committed
update mongo init
1 parent 7192e57 commit c68fbc1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
ports:
1414
- 27017:27017
1515
options: >-
16+
--health-cmd echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'localhost:27017'}]}) }" | mongosh --port 27017 --quiet
17+
--health-interval 5s
18+
--health-retries 30
19+
--health-start-interval 1s
20+
--health-start-period 0s
21+
--health-timeout 30s
1622
--name mongo
1723
steps:
1824
- name: Checkout Code
@@ -28,9 +34,6 @@ jobs:
2834
run: ./scripts/generate-env.sh
2935
- name: Install Dependencies
3036
run: pnpm install --frozen-lockfile
31-
- name: Init Mongo
32-
run: |
33-
docker run mongo mongosh --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]});"
3437
- name: Install Playwright
3538
run: pnpm --filter "@opendatacapture/e2e" exec playwright install --with-deps
3639
- name: Lint

0 commit comments

Comments
 (0)