Skip to content

Commit d2f611b

Browse files
committed
trying another github actions fix
1 parent 016c43d commit d2f611b

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ jobs:
135135
strategy:
136136
matrix:
137137
node-version: [21.x]
138-
mongodb-version: [7.0]
139138
steps:
140139
- uses: actions/checkout@v4
141140
with:
@@ -145,11 +144,12 @@ jobs:
145144
with:
146145
node-version: ${{ matrix.node-version }}
147146

148-
- name: Start MongoDB ${{ matrix.mongodb-version }} Replica Set
149-
uses: supercharge/mongodb-github-action@1.12.0
150-
with:
151-
mongodb-version: ${{ matrix.mongodb-version }}
152-
mongodb-replica-set: rs
147+
- name: Start MongoDB 7.0 Replica Set
148+
run: |
149+
docker run -d --name mongodb -p 27017:27017 mongo:7.0 --replSet rs
150+
sleep 5
151+
docker exec mongodb mongosh --quiet --eval "rs.initiate({_id: 'rs', members: [{_id: 0, host: 'localhost:27017'}]})"
152+
sleep 3
153153
154154
- run: sudo apt update
155155
- run: sudo apt -y install libkrb5-dev
@@ -170,7 +170,6 @@ jobs:
170170
strategy:
171171
matrix:
172172
node-version: [21.x]
173-
mongodb-version: [7.0]
174173
steps:
175174
- uses: actions/checkout@v4
176175
with:
@@ -179,11 +178,12 @@ jobs:
179178
uses: actions/setup-node@v4
180179
with:
181180
node-version: ${{ matrix.node-version }}
182-
- name: Start MongoDB ${{ matrix.mongodb-version }} Replica Set
183-
uses: supercharge/mongodb-github-action@1.12.0
184-
with:
185-
mongodb-version: ${{ matrix.mongodb-version }}
186-
mongodb-replica-set: rs
181+
- name: Start MongoDB 7.0 Replica Set
182+
run: |
183+
docker run -d --name mongodb -p 27017:27017 mongo:7.0 --replSet rs
184+
sleep 5
185+
docker exec mongodb mongosh --quiet --eval "rs.initiate({_id: 'rs', members: [{_id: 0, host: 'localhost:27017'}]})"
186+
sleep 3
187187
188188
- run: sudo apt update
189189
- run: sudo apt -y install libkrb5-dev
@@ -204,7 +204,6 @@ jobs:
204204
strategy:
205205
matrix:
206206
node-version: [21.x]
207-
mongodb-version: [7.0]
208207

209208
steps:
210209
- uses: actions/checkout@v4
@@ -214,11 +213,12 @@ jobs:
214213
uses: actions/setup-node@v4
215214
with:
216215
node-version: ${{ matrix.node-version }}
217-
- name: Start MongoDB ${{ matrix.mongodb-version }} Replica Set
218-
uses: supercharge/mongodb-github-action@1.12.0
219-
with:
220-
mongodb-version: ${{ matrix.mongodb-version }}
221-
mongodb-replica-set: rs
216+
- name: Start MongoDB 7.0 Replica Set
217+
run: |
218+
docker run -d --name mongodb -p 27017:27017 mongo:7.0 --replSet rs
219+
sleep 5
220+
docker exec mongodb mongosh --quiet --eval "rs.initiate({_id: 'rs', members: [{_id: 0, host: 'localhost:27017'}]})"
221+
sleep 3
222222
223223
- run: sudo apt update
224224
- run: sudo apt -y install libkrb5-dev

0 commit comments

Comments
 (0)