diff --git a/.gitignore b/.gitignore index 82bc1a1..9938f9d 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +email_sender/test_report_*.html diff --git a/.travis.yml b/.travis.yml index e5f3945..74ef042 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/bin/upload.sh b/bin/upload.sh index 8141870..4b9eddc 100755 --- a/bin/upload.sh +++ b/bin/upload.sh @@ -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 @@ -14,4 +14,13 @@ if [ "$(ls -A $DIR)" ]; then echo "Finished Google Drive upload" else echo "$DIR is empty" -fi \ No newline at end of file +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"