Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/tests-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,30 @@ jobs:
./redisinsight/api/test/test-runs/start-test-run.sh -r ${{ matrix.rte }} -t ${{ inputs.build }}
mkdir -p itest/coverages && mkdir -p itest/results

- name: Debug - Show directory structure and environment files
run: |
echo "=== DEBUGGING COVERAGE ISSUE ==="
echo "Current working directory: $(pwd)"
echo ""
echo "=== Environment files content ==="
echo "local.build.env:"
cat ./redisinsight/api/test/test-runs/local.build.env
echo ""
echo "docker.build.env:"
cat ./redisinsight/api/test/test-runs/docker.build.env
echo ""
echo "=== Directory structure under redisinsight/api ==="
find ./redisinsight/api -type d -name "*coverage*" -o -name "*test-runs*" | head -10
echo ""
echo "=== Files in expected coverage directory ==="
ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!"
echo ""
echo "=== All files under test-runs ==="
find ./redisinsight/api/test/test-runs -name "*.json" -o -name "*.xml" | head -20
echo ""
echo "=== Looking for test result files anywhere ==="
find ./redisinsight/api -name "test-run-result.*" -o -name "*coverage*.json" | head -10

cp ./redisinsight/api/test/test-runs/coverage/test-run-result.json ./itest/results/${{ matrix.rte }}.result.json
cp ./redisinsight/api/test/test-runs/coverage/test-run-result.xml ./itest/results/${{ matrix.rte }}.result.xml
cp ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json ./itest/coverages/${{ matrix.rte }}.coverage.json
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js -d ./config/ormconfig.ts",
"test:api": "cross-env NODE_ENV=test ts-mocha --paths --config ./test/api/.mocharc.yml",
"test:api:cov": "nyc --reporter=html --reporter=text --reporter=text-summary yarn run test:api",
"test:api:ci:cov": "cross-env nyc -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && nyc merge .nyc_output ./test/test-runs/coverage/test-run-coverage.json",
"test:api:ci:cov": "cross-env nyc -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && nyc merge .nyc_output ./coverage/test-run-coverage.json",
"typeorm:migrate": "cross-env NODE_ENV=staging yarn typeorm migration:generate ./migration/migration",
"typeorm:run": "yarn typeorm migration:run",
"typeorm:run:stage": "cross-env NODE_ENV=staging yarn typeorm migration:run"
Expand Down
4 changes: 2 additions & 2 deletions redisinsight/api/test/api/reporters.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"reporterEnabled": "spec,@mochajs/json-file-reporter,mocha-junit-reporter",
"mochajsJsonFileReporterReporterOptions": {
"output": "test/test-runs/coverage/test-run-result.json"
"output": "coverage/test-run-result.json"
},
"mochaJunitReporterReporterOptions": {
"mochaFile": "test/test-runs/coverage/test-run-result.xml"
"mochaFile": "coverage/test-run-result.xml"
}
}
2 changes: 1 addition & 1 deletion redisinsight/api/test/test-runs/docker.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
dockerfile: ./test/test-runs/test.Dockerfile
tty: true
volumes:
- shared-data:/usr/src/app/coverage
- shared-data:/usr/src/app/test/test-runs/coverage
- shared-data:/root/.redisinsight-v2.0
- shared-data:/data
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/test/test-runs/local.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
dockerfile: ./test/test-runs/test.Dockerfile
tty: true
volumes:
- ${COV_FOLDER}:/usr/src/app/coverage
- ${COV_FOLDER}:/usr/src/app/test/test-runs/coverage
- ${COV_FOLDER}:/root/.redisinsight-v2.0
depends_on:
- redis
Expand Down
3 changes: 0 additions & 3 deletions redisinsight/api/test/test-runs/test-docker-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ eval "$(echo "$GNOME_KEYRING_PASS" | gnome-keyring-daemon --unlock)"
sleep 1
eval "$(echo "$GNOME_KEYRING_PASS" | gnome-keyring-daemon --start)"

# Create coverage directory before running tests
mkdir -p test/test-runs/coverage

exec "$@"