haven-cypress-integration 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/templates/Dockerfile
CHANGED
|
@@ -16,9 +16,9 @@ RUN apt-get update && \
|
|
|
16
16
|
./aws/install && \
|
|
17
17
|
rm -rf aws awscliv2.zip
|
|
18
18
|
|
|
19
|
-
# ✅ Install Node deps
|
|
20
|
-
RUN npm ci
|
|
21
|
-
RUN npm install --no-save aws-sdk
|
|
19
|
+
# ✅ Install Node deps (including dev dependencies for mochawesome)
|
|
20
|
+
RUN npm ci --include=dev
|
|
21
|
+
RUN npm install --no-save aws-sdk mochawesome mochawesome-merge mochawesome-report-generator
|
|
22
22
|
|
|
23
23
|
# ✅ Ensure script is executable
|
|
24
24
|
COPY run-filtered.sh /app/run-filtered.sh
|
|
@@ -64,7 +64,11 @@ MERGED_JSON="results/results.json"
|
|
|
64
64
|
REPORT_HTML="${MOCHAWESOME_DIR}/report.html"
|
|
65
65
|
|
|
66
66
|
echo "🛠️ Attempting to merge mochawesome JSON files..."
|
|
67
|
-
|
|
67
|
+
echo "📁 Contents of ${MOCHAWESOME_DIR}:"
|
|
68
|
+
ls -la ${MOCHAWESOME_DIR}/ || echo "❌ Directory not found"
|
|
69
|
+
echo "🔍 JSON files found:"
|
|
70
|
+
ls ${MOCHAWESOME_DIR}/*.json 2>/dev/null || echo "❌ No JSON files found"
|
|
71
|
+
npx mochawesome-merge ${MOCHAWESOME_DIR}/*.json > "${MERGED_JSON}" 2>&1 || echo "❌ Merge failed"
|
|
68
72
|
|
|
69
73
|
if [ -s "${MERGED_JSON}" ]; then
|
|
70
74
|
echo "✅ Merge successful. Generating report from merged JSON."
|
|
@@ -96,14 +100,17 @@ ZIP_PATH="/tmp/${ZIP_NAME}"
|
|
|
96
100
|
|
|
97
101
|
if [ -d "${MOCHAWESOME_DIR}" ]; then
|
|
98
102
|
echo "📦 Zipping mochawesome report and screenshots..."
|
|
99
|
-
|
|
103
|
+
echo "📁 Contents to zip:"
|
|
104
|
+
ls -la "${MOCHAWESOME_DIR}/"
|
|
105
|
+
zip -r "${ZIP_PATH}" "${MOCHAWESOME_DIR}" || echo "❌ ZIP creation failed"
|
|
106
|
+
echo "✅ ZIP created: ${ZIP_PATH} ($(ls -lh ${ZIP_PATH} 2>/dev/null | awk '{print $5}'))"
|
|
100
107
|
else
|
|
101
108
|
echo "❌ Mochawesome report folder not found: ${MOCHAWESOME_DIR}"
|
|
102
109
|
fi
|
|
103
110
|
|
|
104
111
|
# Upload zipped report to S3
|
|
105
112
|
if [ -f "${ZIP_PATH}" ]; then
|
|
106
|
-
S3_BASE_KEY="artifacts/${PLAN_ID}/automation/${RUN_ID}"
|
|
113
|
+
S3_BASE_KEY="artifacts/${PRODUCT_NAME}/${PLAN_ID}/automation/${RUN_ID}"
|
|
107
114
|
S3_ZIP_KEY="${S3_BASE_KEY}/${ZIP_NAME}"
|
|
108
115
|
echo "☁️ Uploading ZIP to s3://${BUCKET_NAME}/${S3_ZIP_KEY}"
|
|
109
116
|
aws s3 cp "${ZIP_PATH}" "s3://${BUCKET_NAME}/${S3_ZIP_KEY}" || echo "❌ S3 ZIP upload failed"
|
|
@@ -205,7 +205,7 @@ async function uploadLogToS3(planId, runId) {
|
|
|
205
205
|
return null;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
const key = `artifacts/${planId}/automation/${runId}/run_log`;
|
|
208
|
+
const key = `artifacts/${process.env.PRODUCT_NAME}/${planId}/automation/${runId}/run_log`;
|
|
209
209
|
const fileStream = fs.createReadStream(logsPath);
|
|
210
210
|
|
|
211
211
|
try {
|