Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/monkey-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Cache testcontainers images
id: cache-testcontainers
uses: AndreKurait/[email protected]
with:
key: ${{ runner.os }}-testcontainers-mongo-5.0.13-redis-6.2.6

- name: Pull testcontainers images
run: |
docker pull mongo:5.0.13
docker pull redis:6.2.6

- name: Check lint
run: npm run lint-be

Expand Down
2 changes: 2 additions & 0 deletions backend/__tests__/__integration__/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function setup(): Promise<void> {
process.env.TZ = "UTC";

//use testcontainer to start mongodb
//make sure to update the image version in monkey-ci.yml if you change it here
const mongoContainer = new GenericContainer("mongo:5.0.13")
.withExposedPorts(27017)
.withWaitStrategy(Wait.forListeningPorts());
Expand All @@ -19,6 +20,7 @@ export async function setup(): Promise<void> {
process.env["TEST_DB_URL"] = mongoUrl;

//use testcontainer to start redis
//make sure to update the image version in monkey-ci.yml if you change it here
const redisContainer = new GenericContainer("redis:6.2.6")
.withExposedPorts(6379)
.withWaitStrategy(Wait.forLogMessage("Ready to accept connections"));
Expand Down