output the test results and coverage report as artifacts
Some checks failed
Server Tests / Mocha – Unit & Utility Tests (push) Successful in 50s
Server Tests / Jest – Integration Tests (push) Failing after 1m25s

This commit is contained in:
Devin Major 2026-04-29 13:30:25 -04:00
parent 4dad304f86
commit 0a2b93a8c7
2 changed files with 18 additions and 1 deletions

View File

@ -106,13 +106,23 @@ jobs:
TEST_ENV_FILE: ./environment.test.env
NODE_ENV: test
MONGOMS_VERSION: 4.4.28
run: npm run test:integration:jest -- --ci
run: |
set -o pipefail
npm run test:integration:jest -- --ci --coverage 2>&1 | tee jest-integration.log
- name: Upload Jest results
if: always()
uses: actions/upload-artifact@v4
with:
name: jest-integration-results
path: Development/server/jest-integration.log
- name: Upload Jest coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: jest-integration-coverage
path: Development/server/coverage/integration
# ══════════════════════════════════════════════════════════════════════════
# Job 2: Mocha/Chai tests tests/ and tests/utils/
# These tests are self-contained unit tests that do not require MongoDB.

View File

@ -4,6 +4,13 @@
module.exports = {
testMatch: ['**/tests/integration/**/*.integration.test.js'],
testEnvironment: 'node',
collectCoverageFrom: [
'controllers/**/*.js',
'!controllers/export.js',
'!controllers/upload_job.js',
],
coverageDirectory: 'coverage/integration',
coverageReporters: ['text', 'lcov', 'json-summary'],
// Allow extra time on first run when mongodb-memory-server downloads its binary.
testTimeout: 60000,
// Each test file spins up its own in-memory MongoDB instance so files can