File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,34 @@ jobs:
106106 - name : Typecheck code
107107 run : pnpm typecheck
108108 - name : Run tests
109+ id : tests
109110 run : pnpm test-ci
111+ continue-on-error : true
112+ - name : Upload jest image snapshot diffs to S3
113+ if : steps.tests.outcome == 'failure'
114+ run : |
115+ SNAPSHOTS_DIR="products/jbrowse-web/src/tests/__image_snapshots__/__diff_output__"
116+ S3_PATH="s3://jbrowse.org/demos/imagediff/${{ github.run_id }}"
117+
118+ if ls ${SNAPSHOTS_DIR}/*.png 1> /dev/null 2>&1; then
119+ echo "Uploading jest image snapshot diffs to S3..."
120+ aws s3 cp ${SNAPSHOTS_DIR}/ ${S3_PATH}/ --recursive --exclude "*" --include "*.png"
121+
122+ echo ""
123+ echo "============================================"
124+ echo "JEST SNAPSHOT DIFF IMAGES UPLOADED TO S3"
125+ echo "============================================"
126+ for file in ${SNAPSHOTS_DIR}/*.png; do
127+ filename=$(basename "$file")
128+ echo "https://jbrowse.org/demos/imagediff/${{ github.run_id }}/${filename}"
129+ done
130+ echo "============================================"
131+ else
132+ echo "No jest snapshot diff files found"
133+ fi
134+ - name : Fail if tests failed
135+ if : steps.tests.outcome == 'failure'
136+ run : exit 1
110137 - name : Pack artifacts for component tests
111138 run : node --experimental-strip-types scripts/pack.ts
112139 - name : Test build
You can’t perform that action at this time.
0 commit comments