Skip to content

Commit e378ab5

Browse files
committed
ci: initialize Mongo IntegrationV2 schema via service container
1 parent 1fb4752 commit e378ab5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,20 @@ jobs:
228228
run: |
229229
mysql -h $MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS security_guard_dev < resources/sql/security_guard_schema.sql
230230
231-
- name: Init Mongo IntegrationV2 Collections
231+
# - name: Init Mongo IntegrationV2 Collections
232+
# run: |
233+
# mongosh <<EOF
234+
# use security_guard
235+
# db.createCollection("sg_attempts")
236+
# db.createCollection("sg_blocks")
237+
# EOF
238+
- name: Init Mongo IntegrationV2 Schema
232239
run: |
233-
mongosh <<EOF
234-
use security_guard
235-
db.createCollection("sg_attempts")
236-
db.createCollection("sg_blocks")
237-
EOF
240+
docker exec $(docker ps -q --filter "ancestor=mongo:7") \
241+
mongosh "mongodb://127.0.0.1:27017/security_guard" --eval '
242+
db.createCollection("sg_attempts");
243+
db.createCollection("sg_blocks");
244+
'
238245
239246
# ---------------------------------------------
240247
# 9-C) Run IntegrationV2 Tests ONLY

0 commit comments

Comments
 (0)