output the test results and coverage report as artifacts
This commit is contained in:
parent
4dad304f86
commit
0a2b93a8c7
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user