From 485c53a271d2c666990341ff0d09359a70ce0b72 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 11:14:17 +0300 Subject: [PATCH 01/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/test/test-runs/docker.build.env | 2 +- redisinsight/api/test/test-runs/local.build.env | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redisinsight/api/test/test-runs/docker.build.env b/redisinsight/api/test/test-runs/docker.build.env index 64ca7d26e6..50fd64cef0 100644 --- a/redisinsight/api/test/test-runs/docker.build.env +++ b/redisinsight/api/test/test-runs/docker.build.env @@ -1,4 +1,4 @@ -COV_FOLDER=./coverage +COV_FOLDER=./test/test-runs/coverage ID=defaultid RTE=defaultrte APP_IMAGE=redisinsight:amd64 diff --git a/redisinsight/api/test/test-runs/local.build.env b/redisinsight/api/test/test-runs/local.build.env index d0fd5b848e..61a61f5040 100644 --- a/redisinsight/api/test/test-runs/local.build.env +++ b/redisinsight/api/test/test-runs/local.build.env @@ -1,4 +1,4 @@ -COV_FOLDER=./coverage +COV_FOLDER=./test/test-runs/coverage ID=defaultid RTE=defaultrte RI_NOTIFICATION_UPDATE_URL=https://s3.amazonaws.com/redisinsight.test/public/tests/notifications.json From c70786c117a75941306c7e027f5b4eb2e20c21ff Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 11:28:22 +0300 Subject: [PATCH 02/27] RI-0000-fixing test coverage path mismatch --- .github/workflows/tests-integration.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 8099e0eade..a4b1609c44 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -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 From 493f69e25690959210661be1eca6c9b04e0d0b0c Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 12:27:24 +0300 Subject: [PATCH 03/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/test/test-runs/docker.build.env | 2 +- redisinsight/api/test/test-runs/docker.build.yml | 2 +- redisinsight/api/test/test-runs/local.build.env | 2 +- redisinsight/api/test/test-runs/local.build.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/redisinsight/api/test/test-runs/docker.build.env b/redisinsight/api/test/test-runs/docker.build.env index 50fd64cef0..64ca7d26e6 100644 --- a/redisinsight/api/test/test-runs/docker.build.env +++ b/redisinsight/api/test/test-runs/docker.build.env @@ -1,4 +1,4 @@ -COV_FOLDER=./test/test-runs/coverage +COV_FOLDER=./coverage ID=defaultid RTE=defaultrte APP_IMAGE=redisinsight:amd64 diff --git a/redisinsight/api/test/test-runs/docker.build.yml b/redisinsight/api/test/test-runs/docker.build.yml index 6b3949adea..494c10819b 100644 --- a/redisinsight/api/test/test-runs/docker.build.yml +++ b/redisinsight/api/test/test-runs/docker.build.yml @@ -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: diff --git a/redisinsight/api/test/test-runs/local.build.env b/redisinsight/api/test/test-runs/local.build.env index 61a61f5040..d0fd5b848e 100644 --- a/redisinsight/api/test/test-runs/local.build.env +++ b/redisinsight/api/test/test-runs/local.build.env @@ -1,4 +1,4 @@ -COV_FOLDER=./test/test-runs/coverage +COV_FOLDER=./coverage ID=defaultid RTE=defaultrte RI_NOTIFICATION_UPDATE_URL=https://s3.amazonaws.com/redisinsight.test/public/tests/notifications.json diff --git a/redisinsight/api/test/test-runs/local.build.yml b/redisinsight/api/test/test-runs/local.build.yml index 1f5e33787c..e5fe693e0f 100644 --- a/redisinsight/api/test/test-runs/local.build.yml +++ b/redisinsight/api/test/test-runs/local.build.yml @@ -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 From 1bc887e144733ca64c5417e8a77637afd0c7f1dc Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 12:41:05 +0300 Subject: [PATCH 04/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/test/test-runs/test-docker-entry.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/redisinsight/api/test/test-runs/test-docker-entry.sh b/redisinsight/api/test/test-runs/test-docker-entry.sh index 6a1afe66b1..c30c7de723 100644 --- a/redisinsight/api/test/test-runs/test-docker-entry.sh +++ b/redisinsight/api/test/test-runs/test-docker-entry.sh @@ -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 "$@" From 3ccbef27418c5b29feed7dabd21d76873d1190ab Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 12:45:07 +0300 Subject: [PATCH 05/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/test/api/reporters.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redisinsight/api/test/api/reporters.json b/redisinsight/api/test/api/reporters.json index 9c5dbed76c..e7ee7aea0f 100644 --- a/redisinsight/api/test/api/reporters.json +++ b/redisinsight/api/test/api/reporters.json @@ -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" } } From a8054e425fade2954ee49d7782fcff90e49218cc Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 12:51:43 +0300 Subject: [PATCH 06/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 73e52b9cdb..44a7259e23 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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" From 56efd853bfe82f6e4e0c23fdb995c9aeed5d0dd4 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 12:57:53 +0300 Subject: [PATCH 07/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/test/test-runs/docker.build.yml | 2 +- redisinsight/api/test/test-runs/local.build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redisinsight/api/test/test-runs/docker.build.yml b/redisinsight/api/test/test-runs/docker.build.yml index 494c10819b..6b3949adea 100644 --- a/redisinsight/api/test/test-runs/docker.build.yml +++ b/redisinsight/api/test/test-runs/docker.build.yml @@ -13,7 +13,7 @@ services: dockerfile: ./test/test-runs/test.Dockerfile tty: true volumes: - - shared-data:/usr/src/app/test/test-runs/coverage + - shared-data:/usr/src/app/coverage - shared-data:/root/.redisinsight-v2.0 - shared-data:/data depends_on: diff --git a/redisinsight/api/test/test-runs/local.build.yml b/redisinsight/api/test/test-runs/local.build.yml index e5fe693e0f..1f5e33787c 100644 --- a/redisinsight/api/test/test-runs/local.build.yml +++ b/redisinsight/api/test/test-runs/local.build.yml @@ -13,7 +13,7 @@ services: dockerfile: ./test/test-runs/test.Dockerfile tty: true volumes: - - ${COV_FOLDER}:/usr/src/app/test/test-runs/coverage + - ${COV_FOLDER}:/usr/src/app/coverage - ${COV_FOLDER}:/root/.redisinsight-v2.0 depends_on: - redis From e6c227f85a9bedb79ccd13db942a218ab20466e1 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 13:11:07 +0300 Subject: [PATCH 08/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 44a7259e23..5d4c7e5279 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 ./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" From 17d195b1e852af825b134d62005db9a9521e3d48 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 13:30:52 +0300 Subject: [PATCH 09/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/test/test-runs/docker.build.yml | 2 +- redisinsight/api/test/test-runs/local.build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redisinsight/api/test/test-runs/docker.build.yml b/redisinsight/api/test/test-runs/docker.build.yml index 6b3949adea..72f656ded8 100644 --- a/redisinsight/api/test/test-runs/docker.build.yml +++ b/redisinsight/api/test/test-runs/docker.build.yml @@ -57,5 +57,5 @@ volumes: driver: local driver_opts: type: none - device: ${COV_FOLDER} + device: ../../${COV_FOLDER} o: bind diff --git a/redisinsight/api/test/test-runs/local.build.yml b/redisinsight/api/test/test-runs/local.build.yml index 1f5e33787c..97c37dbc56 100644 --- a/redisinsight/api/test/test-runs/local.build.yml +++ b/redisinsight/api/test/test-runs/local.build.yml @@ -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/coverage - ${COV_FOLDER}:/root/.redisinsight-v2.0 depends_on: - redis From 259e1f6cca4c4c7c6eafa516f8c64f225db847d4 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 13:42:20 +0300 Subject: [PATCH 10/27] RI-0000-fixing test coverage path mismatch --- redisinsight/api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 5d4c7e5279..ad4ae94c66 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 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 && echo 'NYC merge starting...' && ls -la .nyc_output && nyc merge .nyc_output coverage/test-run-coverage.json && echo 'NYC merge completed!' && ls -la coverage/", "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" From 3d9168fd3f32a372ab7070138532bbc78a8671a3 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 14:03:52 +0300 Subject: [PATCH 11/27] RI-0000-fixing test coverage path mismatch --- .github/workflows/tests-integration.yml | 45 +++++++++++++++++++++++++ redisinsight/api/package.json | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index a4b1609c44..06ea414f42 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -128,6 +128,51 @@ 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 - Check NYC merge results + if: always() + run: | + echo "=== Test Command Verification ===" + echo "Command that was executed:" + cd ./redisinsight/api && cat package.json | jq -r '.scripts."test:api:ci:cov"' || echo "Could not find test command" + echo "" + echo "=== NYC MERGE DEBUG OUTPUT ===" + cat ./redisinsight/api/test/test-runs/coverage/debug.log || echo "No debug.log found" + echo "" + echo "=== Check .nyc_output directory ===" + ls -la ./redisinsight/api/.nyc_output || echo ".nyc_output directory does not exist!" + if [ -d "./redisinsight/api/.nyc_output" ]; then + echo "Files in .nyc_output:" + find ./redisinsight/api/.nyc_output -type f | head -10 + fi + echo "" + echo "=== NYC Configuration Check ===" + echo "NYC version:" + cd ./redisinsight/api && npm list nyc || echo "NYC not found in package list" + echo "NYC config in package.json:" + cd ./redisinsight/api && cat package.json | jq '.nyc' || echo "No NYC config in package.json" + echo "Check for .nycrc files:" + find ./redisinsight/api -name ".nycrc*" -exec ls -la {} \; || echo "No .nycrc files found" + echo "" + echo "=== Working Directory & Permissions ===" + echo "API directory permissions:" + ls -la ./redisinsight/api/ | head -5 + echo "Coverage directory permissions:" + ls -la ./redisinsight/api/test/test-runs/coverage/ | head -5 + echo "" + echo "=== Check for coverage files specifically ===" + find ./redisinsight/api -name "*coverage*.json" -exec ls -la {} \; || echo "No coverage JSON files found" + echo "" + echo "=== Final coverage directory contents ===" + ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" + echo "" + echo "=== Test execution verification ===" + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then + echo "Test results file exists, checking for test completion:" + grep -E '"tests":|"passes":|"failures":|"pending":' ./redisinsight/api/test/test-runs/coverage/test-run-result.json | head -10 + else + echo "No test results JSON file found" + fi + - name: Debug - Show directory structure and environment files run: | echo "=== DEBUGGING COVERAGE ISSUE ===" diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index ad4ae94c66..722c795fb1 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 && echo 'NYC merge starting...' && ls -la .nyc_output && nyc merge .nyc_output coverage/test-run-coverage.json && echo 'NYC merge completed!' && ls -la coverage/", + "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 && echo 'NYC merge starting...' > coverage/debug.log && echo \"Working directory: $(pwd)\" >> coverage/debug.log 2>&1 && echo \"Environment variables:\" >> coverage/debug.log 2>&1 && env | grep -E '(COV|NYC|NODE)' >> coverage/debug.log 2>&1 && echo \"NYC version:\" >> coverage/debug.log 2>&1 && npm list nyc >> coverage/debug.log 2>&1 && echo \".nyc_output directory contents:\" >> coverage/debug.log 2>&1 && ls -la .nyc_output >> coverage/debug.log 2>&1 && echo \"NYC config:\" >> coverage/debug.log 2>&1 && cat package.json | jq '.nyc' >> coverage/debug.log 2>&1 || echo \"No NYC config\" >> coverage/debug.log 2>&1 && echo \"Coverage directory before merge:\" >> coverage/debug.log 2>&1 && ls -la coverage/ >> coverage/debug.log 2>&1 && echo \"=== Running NYC merge ===\" >> coverage/debug.log 2>&1 && nyc merge .nyc_output coverage/test-run-coverage.json >> coverage/debug.log 2>&1; NYC_EXIT_CODE=$?; echo \"NYC merge exit code: $NYC_EXIT_CODE\" >> coverage/debug.log 2>&1 && echo \"Coverage directory after merge:\" >> coverage/debug.log 2>&1 && ls -la coverage/ >> coverage/debug.log 2>&1 && if [ $NYC_EXIT_CODE -ne 0 ]; then echo \"NYC merge failed with exit code $NYC_EXIT_CODE\" >> coverage/debug.log 2>&1; fi", "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" From 6d7020ef8ea2265fa5276f64e942de218e180701 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 14:18:18 +0300 Subject: [PATCH 12/27] RI-0000-fixing test coverage path mismatch --- .github/workflows/tests-integration.yml | 59 +++++++++---------------- redisinsight/api/package.json | 2 +- 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 06ea414f42..25a236c4cf 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -128,49 +128,34 @@ 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 - Check NYC merge results + - name: Verify coverage files generation if: always() run: | - echo "=== Test Command Verification ===" - echo "Command that was executed:" - cd ./redisinsight/api && cat package.json | jq -r '.scripts."test:api:ci:cov"' || echo "Could not find test command" - echo "" - echo "=== NYC MERGE DEBUG OUTPUT ===" - cat ./redisinsight/api/test/test-runs/coverage/debug.log || echo "No debug.log found" - echo "" - echo "=== Check .nyc_output directory ===" - ls -la ./redisinsight/api/.nyc_output || echo ".nyc_output directory does not exist!" - if [ -d "./redisinsight/api/.nyc_output" ]; then - echo "Files in .nyc_output:" - find ./redisinsight/api/.nyc_output -type f | head -10 - fi - echo "" - echo "=== NYC Configuration Check ===" - echo "NYC version:" - cd ./redisinsight/api && npm list nyc || echo "NYC not found in package list" - echo "NYC config in package.json:" - cd ./redisinsight/api && cat package.json | jq '.nyc' || echo "No NYC config in package.json" - echo "Check for .nycrc files:" - find ./redisinsight/api -name ".nycrc*" -exec ls -la {} \; || echo "No .nycrc files found" - echo "" - echo "=== Working Directory & Permissions ===" - echo "API directory permissions:" - ls -la ./redisinsight/api/ | head -5 - echo "Coverage directory permissions:" - ls -la ./redisinsight/api/test/test-runs/coverage/ | head -5 - echo "" - echo "=== Check for coverage files specifically ===" - find ./redisinsight/api -name "*coverage*.json" -exec ls -la {} \; || echo "No coverage JSON files found" + echo "🎉 SUCCESS! Coverage files are being generated correctly!" echo "" echo "=== Final coverage directory contents ===" ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" echo "" - echo "=== Test execution verification ===" + echo "=== File verification ===" if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then - echo "Test results file exists, checking for test completion:" - grep -E '"tests":|"passes":|"failures":|"pending":' ./redisinsight/api/test/test-runs/coverage/test-run-result.json | head -10 + echo "✅ Test results file exists! File size:" + ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.json + else + echo "❌ Test results file missing!" + fi + + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-coverage.json" ]; then + echo "✅ Coverage file exists! File size:" + ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json + else + echo "❌ Coverage file missing!" + fi + + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.xml" ]; then + echo "✅ JUnit XML file exists! File size:" + ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.xml else - echo "No test results JSON file found" + echo "❌ JUnit XML file missing!" fi - name: Debug - Show directory structure and environment files @@ -220,8 +205,8 @@ jobs: if: always() with: name: 'Test results: IT (${{ matrix.rte }}) tests' - path: itest/results/*.result.xml - reporter: jest-junit + path: itest/results/*.result.json + reporter: mocha-json list-tests: 'failed' list-suites: 'failed' fail-on-error: 'false' diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 722c795fb1..5d4c7e5279 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 && echo 'NYC merge starting...' > coverage/debug.log && echo \"Working directory: $(pwd)\" >> coverage/debug.log 2>&1 && echo \"Environment variables:\" >> coverage/debug.log 2>&1 && env | grep -E '(COV|NYC|NODE)' >> coverage/debug.log 2>&1 && echo \"NYC version:\" >> coverage/debug.log 2>&1 && npm list nyc >> coverage/debug.log 2>&1 && echo \".nyc_output directory contents:\" >> coverage/debug.log 2>&1 && ls -la .nyc_output >> coverage/debug.log 2>&1 && echo \"NYC config:\" >> coverage/debug.log 2>&1 && cat package.json | jq '.nyc' >> coverage/debug.log 2>&1 || echo \"No NYC config\" >> coverage/debug.log 2>&1 && echo \"Coverage directory before merge:\" >> coverage/debug.log 2>&1 && ls -la coverage/ >> coverage/debug.log 2>&1 && echo \"=== Running NYC merge ===\" >> coverage/debug.log 2>&1 && nyc merge .nyc_output coverage/test-run-coverage.json >> coverage/debug.log 2>&1; NYC_EXIT_CODE=$?; echo \"NYC merge exit code: $NYC_EXIT_CODE\" >> coverage/debug.log 2>&1 && echo \"Coverage directory after merge:\" >> coverage/debug.log 2>&1 && ls -la coverage/ >> coverage/debug.log 2>&1 && if [ $NYC_EXIT_CODE -ne 0 ]; then echo \"NYC merge failed with exit code $NYC_EXIT_CODE\" >> coverage/debug.log 2>&1; fi", + "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" From df9c1063d5a43927e24d0cda1299e094085462fc Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 14:33:32 +0300 Subject: [PATCH 13/27] RI-0000-fixing test coverage path mismatch --- .github/workflows/tests-integration.yml | 76 +++++++++++++++++++------ 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 25a236c4cf..6093672348 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -158,33 +158,73 @@ jobs: echo "❌ JUnit XML file missing!" fi - - name: Debug - Show directory structure and environment files + - name: Debug NYC coverage generation + if: always() run: | - echo "=== DEBUGGING COVERAGE ISSUE ===" - echo "Current working directory: $(pwd)" + echo "=== Debugging missing test-run-coverage.json file ===" + echo "Working directory: $(pwd)" echo "" - echo "=== Environment files content ===" - echo "local.build.env:" - cat ./redisinsight/api/test/test-runs/local.build.env + echo "=== Check .nyc_output directory in API folder ===" + cd ./redisinsight/api + if [ -d ".nyc_output" ]; then + echo "✅ .nyc_output directory exists" + echo "Contents:" + ls -la .nyc_output + echo "File count: $(find .nyc_output -name "*.json" | wc -l)" + echo "Sample file content (first 5 lines):" + find .nyc_output -name "*.json" | head -1 | xargs head -5 2>/dev/null || echo "No JSON files to sample" + else + echo "❌ .nyc_output directory does not exist!" + fi echo "" - echo "docker.build.env:" - cat ./redisinsight/api/test/test-runs/docker.build.env + echo "=== Try manual NYC merge ===" + if [ -d ".nyc_output" ] && [ "$(find .nyc_output -name "*.json" | wc -l)" -gt 0 ]; then + echo "Attempting manual NYC merge..." + echo "Command: nyc merge .nyc_output coverage/test-run-coverage.json" + nyc merge .nyc_output coverage/test-run-coverage.json || echo "NYC merge failed with exit code $?" + echo "Checking result:" + ls -la coverage/test-run-coverage.json 2>/dev/null || echo "File not created" + else + echo "Skipping merge - no coverage data files found" + fi echo "" - echo "=== Directory structure under redisinsight/api ===" - find ./redisinsight/api -type d -name "*coverage*" -o -name "*test-runs*" | head -10 + echo "=== Final coverage directory check ===" + ls -la coverage/ | head -10 + + - name: Copy test results to artifacts + run: | + echo "=== COPYING TEST RESULTS ===" + echo "Current working directory: $(pwd)" 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 + echo "=== Copying files with error handling ===" - 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 + # Copy JSON result file (should exist) + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then + cp ./redisinsight/api/test/test-runs/coverage/test-run-result.json ./itest/results/${{ matrix.rte }}.result.json + echo "✅ Copied test-run-result.json" + else + echo "❌ test-run-result.json not found" + fi + + # Copy XML result file (should exist) + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.xml" ]; then + cp ./redisinsight/api/test/test-runs/coverage/test-run-result.xml ./itest/results/${{ matrix.rte }}.result.xml + echo "✅ Copied test-run-result.xml" + else + echo "❌ test-run-result.xml not found" + fi + + # Copy coverage file (may be missing) + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-coverage.json" ]; then + cp ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json ./itest/coverages/${{ matrix.rte }}.coverage.json + echo "✅ Copied test-run-coverage.json" + else + echo "❌ test-run-coverage.json not found - creating empty file" + echo "{}" > ./itest/coverages/${{ matrix.rte }}.coverage.json + fi - name: Upload coverage files as artifact if: always() From 87a390b32f8253da2f240701761fed71f95c05bc Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 14:46:24 +0300 Subject: [PATCH 14/27] RI-0000-fixing test coverage path mismatch --- .github/workflows/tests-integration.yml | 46 +++++++++++++++++-------- redisinsight/api/package.json | 3 +- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 6093672348..f7cd651e2c 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -164,20 +164,36 @@ jobs: echo "=== Debugging missing test-run-coverage.json file ===" echo "Working directory: $(pwd)" echo "" - echo "=== Check .nyc_output directory in API folder ===" + echo "=== Check .nyc_output directory in API folder (HOST) ===" cd ./redisinsight/api if [ -d ".nyc_output" ]; then - echo "✅ .nyc_output directory exists" + echo "✅ .nyc_output directory exists on host" echo "Contents:" ls -la .nyc_output echo "File count: $(find .nyc_output -name "*.json" | wc -l)" echo "Sample file content (first 5 lines):" find .nyc_output -name "*.json" | head -1 | xargs head -5 2>/dev/null || echo "No JSON files to sample" else - echo "❌ .nyc_output directory does not exist!" + echo "❌ .nyc_output directory does not exist on host!" fi echo "" - echo "=== Try manual NYC merge ===" + echo "=== Check .nyc_output directory in DOCKER CONTAINER ===" + cd /home/runner/work/RedisInsight/RedisInsight + export COV_FOLDER="./redisinsight/api/test/test-runs/coverage" + export ID="debug-test" + export RTE="debug" + cd ./redisinsight/api/test/test-runs + echo "Running debug command inside container to check .nyc_output..." + if [ -f "./docker.build.yml" ]; then + echo "Using Docker build..." + echo "Command: docker-compose -f ./docker.build.yml -f ./docker.build.env exec test ls -la /usr/src/app/.nyc_output" + docker-compose -f ./docker.build.yml --env-file ./docker.build.env exec test ls -la /usr/src/app/.nyc_output 2>/dev/null || echo "Container not running or .nyc_output not found in container" + else + echo "Docker compose file not found" + fi + echo "" + echo "=== Try manual NYC merge in HOST ===" + cd /home/runner/work/RedisInsight/RedisInsight/redisinsight/api if [ -d ".nyc_output" ] && [ "$(find .nyc_output -name "*.json" | wc -l)" -gt 0 ]; then echo "Attempting manual NYC merge..." echo "Command: nyc merge .nyc_output coverage/test-run-coverage.json" @@ -239,17 +255,17 @@ jobs: ITEST_NAME=${{ matrix.rte }} node ./.github/itest-results.js curl -H "Content-type: application/json" --data @itests.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - - name: Generate test results - uses: dorny/test-reporter@v1 - id: test-reporter - if: always() - with: - name: 'Test results: IT (${{ matrix.rte }}) tests' - path: itest/results/*.result.json - reporter: mocha-json - list-tests: 'failed' - list-suites: 'failed' - fail-on-error: 'false' + # - name: Generate test results + # uses: dorny/test-reporter@v1 + # id: test-reporter + # if: always() + # with: + # name: 'Test results: IT (${{ matrix.rte }}) tests' + # path: itest/results/*.result.json + # reporter: mocha-json + # list-tests: 'failed' + # list-suites: 'failed' + # fail-on-error: 'false' - name: Add link to report in the workflow summary if: always() diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 5d4c7e5279..6b4e022a11 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 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" @@ -149,6 +149,7 @@ "tsconfig-paths-webpack-plugin": "^3.3.0", "typescript": "^4.8.2" }, + "jest": { "moduleFileExtensions": [ "js", From 3fcbaa134363b3a6e2da707b70472b0202f4bc14 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 16:58:45 +0300 Subject: [PATCH 15/27] RI-0000-fixing test coverage path mismatch - testing nyc params --- redisinsight/api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 6b4e022a11..b05bf1240a 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 ./coverage/test-run-coverage.json", + "test:api:ci:cov": "cross-env nyc --temp-dir .nyc_output --report-dir coverage -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" From 17e95ffd6b0e22020d815b13fa25818b8f1b56b7 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 17:10:34 +0300 Subject: [PATCH 16/27] RI-0000-fixing test coverage path mismatch - testing nyc params --- redisinsight/api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index b05bf1240a..f06dabb78a 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 --temp-dir .nyc_output --report-dir coverage -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", + "test:api:ci:cov": "cross-env NODE_ENV=test nyc --temp-dir .nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && ls -la .nyc_output && 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" From 96a18b2844a601c6b17eba3efbb129ce54679c8c Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 17:31:24 +0300 Subject: [PATCH 17/27] RI-0000-fixing test coverage path mismatch - testing nyc params --- redisinsight/api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index f06dabb78a..31e16b2729 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 NODE_ENV=test nyc --temp-dir .nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && ls -la .nyc_output && nyc merge .nyc_output ./coverage/test-run-coverage.json", + "test:api:ci:cov": "cross-env NODE_ENV=test nyc --temp-dir coverage/.nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && ls -la coverage/.nyc_output && nyc merge coverage/.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" From 881c61d9143afce6f144d7858c610462a90ee093 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 17:39:43 +0300 Subject: [PATCH 18/27] RI-0000-fixing test coverage path mismatch - testing nyc params --- .github/workflows/tests-integration.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 9919b566ed..9ec205c098 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -136,6 +136,9 @@ jobs: echo "=== Final coverage directory contents ===" ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" echo "" + echo "=== Nyc coverage directory contents ===" + ls -la ./redisinsight/api/test/test-runs/coverage/.nyc_output || echo "Nyc directory does not exist!" + echo "" echo "=== File verification ===" if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then echo "✅ Test results file exists! File size:" From 5d5723d446cd55da5e90ba80494d1fff6fba17e7 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 17:48:42 +0300 Subject: [PATCH 19/27] RI-0000-fixing test coverage path mismatch - testing nyc handling in the integrations --- .github/workflows/tests-integration.yml | 47 +++++-------------------- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 9ec205c098..80bcaa3130 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -164,52 +164,21 @@ jobs: - name: Debug NYC coverage generation if: always() run: | - echo "=== Debugging missing test-run-coverage.json file ===" + echo "=== Debugging NYC merge process ===" echo "Working directory: $(pwd)" echo "" - echo "=== Check .nyc_output directory in API folder (HOST) ===" - cd ./redisinsight/api - if [ -d ".nyc_output" ]; then - echo "✅ .nyc_output directory exists on host" - echo "Contents:" - ls -la .nyc_output - echo "File count: $(find .nyc_output -name "*.json" | wc -l)" - echo "Sample file content (first 5 lines):" - find .nyc_output -name "*.json" | head -1 | xargs head -5 2>/dev/null || echo "No JSON files to sample" - else - echo "❌ .nyc_output directory does not exist on host!" - fi - echo "" - echo "=== Check .nyc_output directory in DOCKER CONTAINER ===" - cd /home/runner/work/RedisInsight/RedisInsight - export COV_FOLDER="./redisinsight/api/test/test-runs/coverage" - export ID="debug-test" - export RTE="debug" + echo "=== Try manual NYC merge on HOST ===" cd ./redisinsight/api/test/test-runs - echo "Running debug command inside container to check .nyc_output..." - if [ -f "./docker.build.yml" ]; then - echo "Using Docker build..." - echo "Command: docker-compose -f ./docker.build.yml -f ./docker.build.env exec test ls -la /usr/src/app/.nyc_output" - docker-compose -f ./docker.build.yml --env-file ./docker.build.env exec test ls -la /usr/src/app/.nyc_output 2>/dev/null || echo "Container not running or .nyc_output not found in container" - else - echo "Docker compose file not found" - fi - echo "" - echo "=== Try manual NYC merge in HOST ===" - cd /home/runner/work/RedisInsight/RedisInsight/redisinsight/api - - if [ -d ".nyc_output" ] && [ "$(find .nyc_output -name "*.json" | wc -l)" -gt 0 ]; then + if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then + echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files" echo "Attempting manual NYC merge..." - echo "Command: nyc merge .nyc_output coverage/test-run-coverage.json" - nyc merge .nyc_output coverage/test-run-coverage.json || echo "NYC merge failed with exit code $?" + echo "Command: cd ../.. && nyc merge ./test/test-runs/coverage/.nyc_output ./test/test-runs/coverage/test-run-coverage.json" + cd ../.. && nyc merge ./test/test-runs/coverage/.nyc_output ./test/test-runs/coverage/test-run-coverage.json || echo "NYC merge failed with exit code $?" echo "Checking result:" - ls -la coverage/test-run-coverage.json 2>/dev/null || echo "File not created" + ls -la ./test/test-runs/coverage/test-run-coverage.json 2>/dev/null || echo "File not created" else - echo "Skipping merge - no coverage data files found" + echo "❌ No coverage data files found in coverage/.nyc_output" fi - echo "" - echo "=== Final coverage directory check ===" - ls -la coverage/ | head -10 - name: Copy test results to artifacts run: | From c550b2b3a310398272cd2f1c850eab08381b0d95 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 17:57:17 +0300 Subject: [PATCH 20/27] RI-0000-fixing test coverage path mismatch - testing nyc handling in the integrations --- .github/workflows/tests-integration.yml | 16 +++++++++------- redisinsight/api/package.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 80bcaa3130..3ee69b367e 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -164,18 +164,20 @@ jobs: - name: Debug NYC coverage generation if: always() run: | - echo "=== Debugging NYC merge process ===" + echo "=== Checking coverage generation results ===" echo "Working directory: $(pwd)" echo "" - echo "=== Try manual NYC merge on HOST ===" + echo "=== Coverage files status ===" cd ./redisinsight/api/test/test-runs if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files" - echo "Attempting manual NYC merge..." - echo "Command: cd ../.. && nyc merge ./test/test-runs/coverage/.nyc_output ./test/test-runs/coverage/test-run-coverage.json" - cd ../.. && nyc merge ./test/test-runs/coverage/.nyc_output ./test/test-runs/coverage/test-run-coverage.json || echo "NYC merge failed with exit code $?" - echo "Checking result:" - ls -la ./test/test-runs/coverage/test-run-coverage.json 2>/dev/null || echo "File not created" + echo "✅ NYC raw coverage data generated successfully" + if [ -f "coverage/test-run-coverage.json" ]; then + echo "✅ test-run-coverage.json file exists!" + ls -lh coverage/test-run-coverage.json + else + echo "❌ test-run-coverage.json file missing - NYC merge failed in Docker container" + fi else echo "❌ No coverage data files found in coverage/.nyc_output" fi diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 31e16b2729..1dabe72f4d 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 NODE_ENV=test nyc --temp-dir coverage/.nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && ls -la coverage/.nyc_output && nyc merge coverage/.nyc_output ./coverage/test-run-coverage.json", + "test:api:ci:cov": "cross-env NODE_ENV=test nyc --temp-dir coverage/.nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && echo 'NYC tests completed, checking .nyc_output...' && ls -la coverage/.nyc_output && echo 'Running NYC merge...' && nyc merge coverage/.nyc_output coverage/test-run-coverage.json && echo 'NYC merge completed!' && ls -la 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" From 39360def5d9f8eeff75dd01905cfe88b8d17f362 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 18:06:45 +0300 Subject: [PATCH 21/27] RI-0000-fixing test coverage path mismatch - testing nyc handling in the integrations --- .github/workflows/tests-integration.yml | 10 +++++++++- redisinsight/api/package.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 3ee69b367e..a8e7667c58 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -167,8 +167,16 @@ jobs: echo "=== Checking coverage generation results ===" echo "Working directory: $(pwd)" echo "" - echo "=== Coverage files status ===" + echo "=== Docker container debug log ===" cd ./redisinsight/api/test/test-runs + if [ -f "coverage/debug.log" ]; then + echo "📋 Debug log from Docker container:" + cat coverage/debug.log + else + echo "❌ No debug log found from Docker container" + fi + echo "" + echo "=== Coverage files status ===" if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files" echo "✅ NYC raw coverage data generated successfully" diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index 1dabe72f4d..f62770c461 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -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 NODE_ENV=test nyc --temp-dir coverage/.nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && echo 'NYC tests completed, checking .nyc_output...' && ls -la coverage/.nyc_output && echo 'Running NYC merge...' && nyc merge coverage/.nyc_output coverage/test-run-coverage.json && echo 'NYC merge completed!' && ls -la coverage/test-run-coverage.json", + "test:api:ci:cov": "cross-env NODE_ENV=test nyc --temp-dir coverage/.nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json; echo 'Exit code from tests:' $? > coverage/debug.log; echo 'NYC tests completed, checking .nyc_output...' >> coverage/debug.log; ls -la coverage/.nyc_output >> coverage/debug.log 2>&1; echo 'Running NYC merge...' >> coverage/debug.log; nyc merge coverage/.nyc_output coverage/test-run-coverage.json >> coverage/debug.log 2>&1; echo 'NYC merge exit code:' $? >> coverage/debug.log; echo 'NYC merge completed!' >> coverage/debug.log; ls -la coverage/test-run-coverage.json >> coverage/debug.log 2>&1", "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" From 2ba79956fe60ce5f1d81cb2f63b721d1cfe6c3fd Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 18:14:28 +0300 Subject: [PATCH 22/27] RI-0000-fixing test coverage path mismatch - removing logs and debug --- .github/workflows/tests-integration.yml | 84 ++++--------------------- 1 file changed, 11 insertions(+), 73 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index a8e7667c58..c6b432dcb2 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -128,68 +128,6 @@ 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: Verify coverage files generation - if: always() - run: | - echo "🎉 SUCCESS! Coverage files are being generated correctly!" - echo "" - echo "=== Final coverage directory contents ===" - ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" - echo "" - echo "=== Nyc coverage directory contents ===" - ls -la ./redisinsight/api/test/test-runs/coverage/.nyc_output || echo "Nyc directory does not exist!" - echo "" - echo "=== File verification ===" - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then - echo "✅ Test results file exists! File size:" - ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.json - else - echo "❌ Test results file missing!" - fi - - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-coverage.json" ]; then - echo "✅ Coverage file exists! File size:" - ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json - else - echo "❌ Coverage file missing!" - fi - - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.xml" ]; then - echo "✅ JUnit XML file exists! File size:" - ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.xml - else - echo "❌ JUnit XML file missing!" - fi - - - name: Debug NYC coverage generation - if: always() - run: | - echo "=== Checking coverage generation results ===" - echo "Working directory: $(pwd)" - echo "" - echo "=== Docker container debug log ===" - cd ./redisinsight/api/test/test-runs - if [ -f "coverage/debug.log" ]; then - echo "📋 Debug log from Docker container:" - cat coverage/debug.log - else - echo "❌ No debug log found from Docker container" - fi - echo "" - echo "=== Coverage files status ===" - if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then - echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files" - echo "✅ NYC raw coverage data generated successfully" - if [ -f "coverage/test-run-coverage.json" ]; then - echo "✅ test-run-coverage.json file exists!" - ls -lh coverage/test-run-coverage.json - else - echo "❌ test-run-coverage.json file missing - NYC merge failed in Docker container" - fi - else - echo "❌ No coverage data files found in coverage/.nyc_output" - fi - - name: Copy test results to artifacts run: | echo "=== COPYING TEST RESULTS ===" @@ -239,17 +177,17 @@ jobs: ITEST_NAME=${{ matrix.rte }} node ./.github/itest-results.js curl -H "Content-type: application/json" --data @itests.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - # - name: Generate test results - # uses: dorny/test-reporter@v1 - # id: test-reporter - # if: always() - # with: - # name: 'Test results: IT (${{ matrix.rte }}) tests' - # path: itest/results/*.result.json - # reporter: mocha-json - # list-tests: 'failed' - # list-suites: 'failed' - # fail-on-error: 'false' + - name: Generate test results + uses: dorny/test-reporter@v1 + id: test-reporter + if: always() + with: + name: 'Test results: IT (${{ matrix.rte }}) tests' + path: itest/results/*.result.json + reporter: mocha-json + list-tests: 'failed' + list-suites: 'failed' + fail-on-error: 'false' - name: Add link to report in the workflow summary if: always() From 25940d92d0ee1e0765b2c46ffb79d78358545cb0 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Wed, 9 Jul 2025 18:22:03 +0300 Subject: [PATCH 23/27] RI-0000-fixing test coverage path mismatch - removing logs and debug --- .github/workflows/tests-integration.yml | 84 +++++++++++++++++++++---- 1 file changed, 73 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index c6b432dcb2..a8e7667c58 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -128,6 +128,68 @@ 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: Verify coverage files generation + if: always() + run: | + echo "🎉 SUCCESS! Coverage files are being generated correctly!" + echo "" + echo "=== Final coverage directory contents ===" + ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" + echo "" + echo "=== Nyc coverage directory contents ===" + ls -la ./redisinsight/api/test/test-runs/coverage/.nyc_output || echo "Nyc directory does not exist!" + echo "" + echo "=== File verification ===" + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then + echo "✅ Test results file exists! File size:" + ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.json + else + echo "❌ Test results file missing!" + fi + + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-coverage.json" ]; then + echo "✅ Coverage file exists! File size:" + ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json + else + echo "❌ Coverage file missing!" + fi + + if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.xml" ]; then + echo "✅ JUnit XML file exists! File size:" + ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.xml + else + echo "❌ JUnit XML file missing!" + fi + + - name: Debug NYC coverage generation + if: always() + run: | + echo "=== Checking coverage generation results ===" + echo "Working directory: $(pwd)" + echo "" + echo "=== Docker container debug log ===" + cd ./redisinsight/api/test/test-runs + if [ -f "coverage/debug.log" ]; then + echo "📋 Debug log from Docker container:" + cat coverage/debug.log + else + echo "❌ No debug log found from Docker container" + fi + echo "" + echo "=== Coverage files status ===" + if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then + echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files" + echo "✅ NYC raw coverage data generated successfully" + if [ -f "coverage/test-run-coverage.json" ]; then + echo "✅ test-run-coverage.json file exists!" + ls -lh coverage/test-run-coverage.json + else + echo "❌ test-run-coverage.json file missing - NYC merge failed in Docker container" + fi + else + echo "❌ No coverage data files found in coverage/.nyc_output" + fi + - name: Copy test results to artifacts run: | echo "=== COPYING TEST RESULTS ===" @@ -177,17 +239,17 @@ jobs: ITEST_NAME=${{ matrix.rte }} node ./.github/itest-results.js curl -H "Content-type: application/json" --data @itests.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - - name: Generate test results - uses: dorny/test-reporter@v1 - id: test-reporter - if: always() - with: - name: 'Test results: IT (${{ matrix.rte }}) tests' - path: itest/results/*.result.json - reporter: mocha-json - list-tests: 'failed' - list-suites: 'failed' - fail-on-error: 'false' + # - name: Generate test results + # uses: dorny/test-reporter@v1 + # id: test-reporter + # if: always() + # with: + # name: 'Test results: IT (${{ matrix.rte }}) tests' + # path: itest/results/*.result.json + # reporter: mocha-json + # list-tests: 'failed' + # list-suites: 'failed' + # fail-on-error: 'false' - name: Add link to report in the workflow summary if: always() From 01016ea5481ed84d42c7b96807dc7005b9fd2dcc Mon Sep 17 00:00:00 2001 From: Kristiyan Ivanov Date: Thu, 10 Jul 2025 08:35:13 +0300 Subject: [PATCH 24/27] RI-0000 - fixing path issues - itest to ./itest --- .github/workflows/tests-integration.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 5eaeeb39c5..1f87addd95 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -231,21 +231,15 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverages-${{ matrix.rte }} - path: itest/coverages - - - name: Send report to Slack - if: inputs.report && always() - run: | - ITEST_NAME=${{ matrix.rte }} node ./.github/itest-results.js - curl -H "Content-type: application/json" --data @itests.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - + path: ./itest/coverages + - name: Generate test results uses: dorny/test-reporter@v1 id: test-reporter if: always() with: name: 'Test results: IT (${{ matrix.rte }}) tests' - path: itest/results/*.result.json + path: ./itest/results/*.result.json reporter: mocha-json list-tests: 'failed' list-suites: 'failed' From d0f5c83446218ad50d15ae74698d5bba3d4c6a27 Mon Sep 17 00:00:00 2001 From: Kristiyan Ivanov Date: Thu, 10 Jul 2025 08:45:42 +0300 Subject: [PATCH 25/27] RI-0000 - fixing path issues - itest to ./itest --- .github/workflows/tests-integration.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 1f87addd95..617f180be8 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -239,8 +239,9 @@ jobs: if: always() with: name: 'Test results: IT (${{ matrix.rte }}) tests' - path: ./itest/results/*.result.json - reporter: mocha-json + path: ./redisinsight/api/test/test-runs/coverage/*.result.xml + # path: itest/results/*.result.xml + reporter: jest-junit list-tests: 'failed' list-suites: 'failed' fail-on-error: 'false' From c8c2eaae060595c80813a1b2451b9c300bce1a4d Mon Sep 17 00:00:00 2001 From: Kristiyan Ivanov Date: Thu, 10 Jul 2025 09:03:04 +0300 Subject: [PATCH 26/27] RI-0000 reverting to the main branch config --- .github/workflows/tests-integration.yml | 115 +++--------------------- 1 file changed, 13 insertions(+), 102 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 617f180be8..200c7299ff 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -128,119 +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: Verify coverage files generation - if: always() - run: | - echo "🎉 SUCCESS! Coverage files are being generated correctly!" - echo "" - echo "=== Final coverage directory contents ===" - ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" - echo "" - echo "=== Nyc coverage directory contents ===" - ls -la ./redisinsight/api/test/test-runs/coverage/.nyc_output || echo "Nyc directory does not exist!" - echo "" - echo "=== File verification ===" - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then - echo "✅ Test results file exists! File size:" - ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.json - else - echo "❌ Test results file missing!" - fi - - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-coverage.json" ]; then - echo "✅ Coverage file exists! File size:" - ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json - else - echo "❌ Coverage file missing!" - fi - - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.xml" ]; then - echo "✅ JUnit XML file exists! File size:" - ls -lh ./redisinsight/api/test/test-runs/coverage/test-run-result.xml - else - echo "❌ JUnit XML file missing!" - fi - - - name: Debug NYC coverage generation - if: always() - run: | - echo "=== Checking coverage generation results ===" - echo "Working directory: $(pwd)" - echo "" - echo "=== Docker container debug log ===" - cd ./redisinsight/api/test/test-runs - if [ -f "coverage/debug.log" ]; then - echo "📋 Debug log from Docker container:" - cat coverage/debug.log - else - echo "❌ No debug log found from Docker container" - fi - echo "" - echo "=== Coverage files status ===" - if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then - echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files" - echo "✅ NYC raw coverage data generated successfully" - if [ -f "coverage/test-run-coverage.json" ]; then - echo "✅ test-run-coverage.json file exists!" - ls -lh coverage/test-run-coverage.json - else - echo "❌ test-run-coverage.json file missing - NYC merge failed in Docker container" - fi - else - echo "❌ No coverage data files found in coverage/.nyc_output" - fi - - - name: Copy test results to artifacts - run: | - echo "=== COPYING TEST RESULTS ===" - echo "Current working directory: $(pwd)" - echo "" - echo "=== Files in expected coverage directory ===" - ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Coverage directory does not exist!" - echo "" - - echo "=== Copying files with error handling ===" - - # Copy JSON result file (should exist) - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.json" ]; then - cp ./redisinsight/api/test/test-runs/coverage/test-run-result.json ./itest/results/${{ matrix.rte }}.result.json - echo "✅ Copied test-run-result.json" - else - echo "❌ test-run-result.json not found" - fi - - # Copy XML result file (should exist) - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-result.xml" ]; then - cp ./redisinsight/api/test/test-runs/coverage/test-run-result.xml ./itest/results/${{ matrix.rte }}.result.xml - echo "✅ Copied test-run-result.xml" - else - echo "❌ test-run-result.xml not found" - fi - - # Copy coverage file (may be missing) - if [ -f "./redisinsight/api/test/test-runs/coverage/test-run-coverage.json" ]; then - cp ./redisinsight/api/test/test-runs/coverage/test-run-coverage.json ./itest/coverages/${{ matrix.rte }}.coverage.json - echo "✅ Copied test-run-coverage.json" - else - echo "❌ test-run-coverage.json not found - creating empty file" - echo "{}" > ./itest/coverages/${{ matrix.rte }}.coverage.json - fi + 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 - name: Upload coverage files as artifact if: always() uses: actions/upload-artifact@v4 with: name: coverages-${{ matrix.rte }} - path: ./itest/coverages - + path: itest/coverages + + - name: Send report to Slack + if: inputs.report && always() + run: | + ITEST_NAME=${{ matrix.rte }} node ./.github/itest-results.js + curl -H "Content-type: application/json" --data @itests.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage + - name: Generate test results uses: dorny/test-reporter@v1 id: test-reporter if: always() with: name: 'Test results: IT (${{ matrix.rte }}) tests' - path: ./redisinsight/api/test/test-runs/coverage/*.result.xml - # path: itest/results/*.result.xml + path: itest/results/*.result.xml reporter: jest-junit list-tests: 'failed' list-suites: 'failed' @@ -297,4 +208,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, artifact_id: ${{ steps.merge-artifacts.outputs.artifact-id }} - }); + }); \ No newline at end of file From cc215146eb24741bacf90d7e1f72a638db535f44 Mon Sep 17 00:00:00 2001 From: KIvanow Date: Thu, 10 Jul 2025 10:03:27 +0300 Subject: [PATCH 27/27] RI-00000 fixing coverage paths - wront itest/results path? --- .github/workflows/tests-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index f85dc92967..8509c4157e 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -138,14 +138,14 @@ jobs: with: name: coverages-${{ matrix.rte }} path: ./itest/coverages - + - name: Generate test results uses: dorny/test-reporter@v1 id: test-reporter if: always() with: name: 'Test results: IT (${{ matrix.rte }}) tests' - path: itest/results/*.result.xml + path: ./itest/results/*.result.xml reporter: jest-junit list-tests: 'failed' list-suites: 'failed'