From 0ae98ff011ff55716a2e32a182ec678acd012ece Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 23 Apr 2024 08:21:12 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20ci:=20Add=20`.env.test`=20for=20?= =?UTF-8?q?`backend-review.yml`=20(#2501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🧪 ci: Add `.env.test` for `backend-review.yml` * chore: touch example file --- .github/workflows/backend-review.yml | 5 ++++- api/test/.env.test.example | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend-review.yml b/.github/workflows/backend-review.yml index 9f8bd7b530..52560009a9 100644 --- a/.github/workflows/backend-review.yml +++ b/.github/workflows/backend-review.yml @@ -51,6 +51,9 @@ jobs: exit 1 fi + - name: Prepare .env.test file + run: cp api/test/.env.test.example api/test/.env.test + - name: Run unit tests run: cd api && npm run test:ci @@ -60,4 +63,4 @@ jobs: - name: Run linters uses: wearerequired/lint-action@v2 with: - eslint: true \ No newline at end of file + eslint: true diff --git a/api/test/.env.test.example b/api/test/.env.test.example index 16730f672d..9b7a75a996 100644 --- a/api/test/.env.test.example +++ b/api/test/.env.test.example @@ -1,4 +1,4 @@ -# Test database. You can use your actual MONGO_URI if you don't mind it potentially including test data. +# Test DB URI. You can use your actual MONGO_URI if you don't mind it potentially including test data. MONGO_URI=mongodb://127.0.0.1:27017/chatgpt-jest # Credential encryption/decryption for testing