Skip to content
This repository was archived by the owner on Dec 31, 2019. It is now read-only.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
node_modules/*
test/itg/1.6/mochawesome-report/*
test/itg/1.7/mochawesome-report/*
.DS_Store
.idea/*
**/screenshots
**.log
**/mochawesome-report
email_sender/test_report_*.html
email_sender/test_report_*.html
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ before_script:
- DISPLAY=:10 ./selenium-standalone start &> /dev/null &
- cd ../../..
- npm install
- npm install mochawesome
- cd test/itg/$PS_VERSION
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_10.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :10 -ac -screen 0 1280x1024x16"
- docker exec prestashop rm -rf /var/www/html/modules/welcome
Expand Down
13 changes: 11 additions & 2 deletions bin/upload.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

FIXED_BRANCH=$(echo $TRAVIS_BRANCH | sed 's/\//-/g')
ARCHIVE=$FIXED_BRANCH-$(date +%Y-%m-%d_%H_%M_%S)-$TRAVIS_COMMIT.tar.bz2
ARCHIVE=ScreenShot-$FIXED_BRANCH-$(date +%Y-%m-%d_%H_%M_%S)-$TRAVIS_COMMIT.tar.bz2
DIR="test/itg/$PS_VERSION/screenshots"

# look for empty dir
Expand All @@ -14,4 +14,13 @@ if [ "$(ls -A $DIR)" ]; then
echo "Finished Google Drive upload"
else
echo "$DIR is empty"
fi
fi

# uploading mochareporter to Gdrive
ARCHIVE_REPORTER=TestReport-$FIXED_BRANCH-$(date +%Y-%m-%d_%H_%M_%S)-$TRAVIS_COMMIT.zip
echo "Creating archive of test report $ARCHIVE_REPORTER"
cd test/itg/$PS_VERSION/ && \
zip -r $ARCHIVE_REPORTER mochawesome-report/*
cd ../../..
./bin/gdrive-linux-x64 upload --refresh-token $GDRIVE_REFRESH_TOKEN --parent $GDRIVE_DIR "test/itg/$PS_VERSION/$ARCHIVE_REPORTER"
echo "Finished uploading test report"