Skip to content

Commit 2a2a71e

Browse files
author
Kristiyan Ivanov
authored
Ri 0000 fixing coverage paths (#4697)
* RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch * RI-0000-fixing test coverage path mismatch - testing nyc params * RI-0000-fixing test coverage path mismatch - testing nyc params * RI-0000-fixing test coverage path mismatch - testing nyc params * RI-0000-fixing test coverage path mismatch - testing nyc params * RI-0000-fixing test coverage path mismatch - testing nyc handling in the integrations
1 parent 430f788 commit 2a2a71e

File tree

1 file changed

+8
-39
lines changed

1 file changed

+8
-39
lines changed

.github/workflows/tests-integration.yml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -164,52 +164,21 @@ jobs:
164164
- name: Debug NYC coverage generation
165165
if: always()
166166
run: |
167-
echo "=== Debugging missing test-run-coverage.json file ==="
167+
echo "=== Debugging NYC merge process ==="
168168
echo "Working directory: $(pwd)"
169169
echo ""
170-
echo "=== Check .nyc_output directory in API folder (HOST) ==="
171-
cd ./redisinsight/api
172-
if [ -d ".nyc_output" ]; then
173-
echo "✅ .nyc_output directory exists on host"
174-
echo "Contents:"
175-
ls -la .nyc_output
176-
echo "File count: $(find .nyc_output -name "*.json" | wc -l)"
177-
echo "Sample file content (first 5 lines):"
178-
find .nyc_output -name "*.json" | head -1 | xargs head -5 2>/dev/null || echo "No JSON files to sample"
179-
else
180-
echo "❌ .nyc_output directory does not exist on host!"
181-
fi
182-
echo ""
183-
echo "=== Check .nyc_output directory in DOCKER CONTAINER ==="
184-
cd /home/runner/work/RedisInsight/RedisInsight
185-
export COV_FOLDER="./redisinsight/api/test/test-runs/coverage"
186-
export ID="debug-test"
187-
export RTE="debug"
170+
echo "=== Try manual NYC merge on HOST ==="
188171
cd ./redisinsight/api/test/test-runs
189-
echo "Running debug command inside container to check .nyc_output..."
190-
if [ -f "./docker.build.yml" ]; then
191-
echo "Using Docker build..."
192-
echo "Command: docker-compose -f ./docker.build.yml -f ./docker.build.env exec test ls -la /usr/src/app/.nyc_output"
193-
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"
194-
else
195-
echo "Docker compose file not found"
196-
fi
197-
echo ""
198-
echo "=== Try manual NYC merge in HOST ==="
199-
cd /home/runner/work/RedisInsight/RedisInsight/redisinsight/api
200-
201-
if [ -d ".nyc_output" ] && [ "$(find .nyc_output -name "*.json" | wc -l)" -gt 0 ]; then
172+
if [ -d "coverage/.nyc_output" ] && [ "$(find coverage/.nyc_output -name "*.json" | wc -l)" -gt 0 ]; then
173+
echo "✅ .nyc_output directory found with $(find coverage/.nyc_output -name "*.json" | wc -l) files"
202174
echo "Attempting manual NYC merge..."
203-
echo "Command: nyc merge .nyc_output coverage/test-run-coverage.json"
204-
nyc merge .nyc_output coverage/test-run-coverage.json || echo "NYC merge failed with exit code $?"
175+
echo "Command: cd ../.. && nyc merge ./test/test-runs/coverage/.nyc_output ./test/test-runs/coverage/test-run-coverage.json"
176+
cd ../.. && nyc merge ./test/test-runs/coverage/.nyc_output ./test/test-runs/coverage/test-run-coverage.json || echo "NYC merge failed with exit code $?"
205177
echo "Checking result:"
206-
ls -la coverage/test-run-coverage.json 2>/dev/null || echo "File not created"
178+
ls -la ./test/test-runs/coverage/test-run-coverage.json 2>/dev/null || echo "File not created"
207179
else
208-
echo "Skipping merge - no coverage data files found"
180+
echo "❌ No coverage data files found in coverage/.nyc_output"
209181
fi
210-
echo ""
211-
echo "=== Final coverage directory check ==="
212-
ls -la coverage/ | head -10
213182
214183
- name: Copy test results to artifacts
215184
run: |

0 commit comments

Comments
 (0)