run-integration-test-circleci.sh 914 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. set -ex
  3. GECKODRIVER_URL=$(
  4. curl -s 'https://api.github.com/repos/mozilla/geckodriver/releases/latest' |
  5. python -c "import sys, json; r = json.load(sys.stdin); print([a for a in r['assets'] if 'linux64' in a['name']][0]['browser_download_url']);"
  6. );
  7. curl -L -o geckodriver.tar.gz $GECKODRIVER_URL
  8. gunzip -c geckodriver.tar.gz | tar xopf -
  9. chmod +x geckodriver
  10. sudo mv geckodriver /bin
  11. geckodriver --version
  12. # Install pip
  13. sudo apt-get install python-pip
  14. sudo pip install --upgrade pip
  15. sudo pip install mozdownload mozinstall==1.15
  16. mkdir -p ~/project/firefox-downloads/
  17. find ~/project/firefox-downloads/ -type f -mtime +90 -delete
  18. mozdownload --version latest --type daily --destination ~/project/firefox-downloads/firefox_nightly/
  19. export PATH=~/project/firefox:$PATH
  20. mozinstall $(ls -t firefox-downloads/firefox_nightly/*.tar.bz2 | head -1)
  21. firefox --version
  22. npm run circleci-test-integration