Skip to content

Commit

Permalink
add ability to store testing results screenshots to output repo
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Nov 18, 2019
1 parent e6aa8f0 commit 6a8b7ec
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions automation-testing
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export TEST_REPORT_OUTPUT="$(pwd)/remote-seleniumhub-chrome/generated-docs"
echo ::set-env name=TEST_REPORT_OUTPUT::${TEST_REPORT_OUTPUT}
echo REPORT PATH=$TEST_REPORT_OUTPUT

export TEST_REPORT_COMPARE_SOURCES="$(pwd)/src/test/screenshots"
echo ::set-env name=TEST_REPORT_COMPARE_SOURCES::${TEST_REPORT_COMPARE_SOURCES}
echo REPORT COMPARE SOURCES PATH=$TEST_REPORT_COMPARE_SOURCES

echo BUILD DIR FOR PUBLISH RESULTS
export PATH_GHPAGES="./build/ghpages"
echo PATH_GHPAGES=${PATH_GHPAGES}
Expand Down
20 changes: 18 additions & 2 deletions automation-testing-release
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if [[ ${REPORT_REPO} == "" || ${REPORT_REPO_NAME} == "" ]]; then
fi

# check if git variables are set
if [[ ${TEST_REPORT_OUTPUT} == "" || ${REPORT_DIR} == "" || ${TEST_REPORT_GHPAGES_PATH} == "" ]]; then
echo PLEASE SET TEST_REPORT_OUTPUT, REPORT_DIR AND TEST_REPORT_GHPAGES_PATH VARIABLE
if [[ ${TEST_REPORT_OUTPUT} == "" || ${REPORT_DIR} == "" || ${TEST_REPORT_GHPAGES_PATH} == "" || ${TEST_REPORT_COMPARE_SOURCES} == "" ]]; then
echo PLEASE SET TEST_REPORT_OUTPUT, REPORT_DIR, TEST_REPORT_GHPAGES_PATH AND TEST_REPORT_COMPARE_SOURCES VARIABLE
exit 1
fi

Expand Down Expand Up @@ -55,3 +55,19 @@ echo COMMIT AND PUSH UPDATES
git add .
git commit -a -m "update reports <a href='https://github.com/aem-design/aemdesign-aem-support/commit/${TEST_REPORT_COMMENT}'>${TEST_REPORT_COMMENT}</a>"
git push ${REPORT_REPO} gh-pages

echo COMMIT AND PUSH COMPARE IMAGES TO MASTER
git checkout master

echo TEST_REPORT_COMPARE_SOURCES: ${TEST_REPORT_COMPARE_SOURCES}
echo TO: "${OUTPUT_DEST}"

echo COPY UPDATED REPORT COMPARE ASSETS
cp -Rvrf "${TEST_REPORT_COMPARE_SOURCES}" "${OUTPUT_DEST}"

# add any files bigger than 100mb to gitlfs
find ${REPORT_CONTENT} -size +100000k -exec git lfs track {} \;

git add .
git commit -a -m "update compare assets <a href='https://github.com/aem-design/aemdesign-aem-support/commit/${TEST_REPORT_COMMENT}'>${TEST_REPORT_COMMENT}</a>"
git push ${REPORT_REPO} master

0 comments on commit 6a8b7ec

Please sign in to comment.