|
| 1 | +sudo: required |
| 2 | +dist: xenial |
| 3 | +language: python |
| 4 | + |
| 5 | +python: 3.6 |
| 6 | +install: true |
| 7 | + |
| 8 | +git: |
| 9 | + depth: false |
| 10 | + quiet: true |
| 11 | + |
| 12 | +services: docker |
| 13 | + |
| 14 | +stages: |
| 15 | + - name: tests |
| 16 | + if: type IN (push, pull_request) |
| 17 | + - name: uitests |
| 18 | + if: type IN (pull_request) |
| 19 | + |
| 20 | +jobs: |
| 21 | + include: |
| 22 | + - stage: tests |
| 23 | + name: "Code Style Check" |
| 24 | + python: 3.6 |
| 25 | + before_script: |
| 26 | + - pip install tox-travis |
| 27 | + script: tox -e flake8 |
| 28 | + - stage: tests |
| 29 | + name: "Unit Tests" |
| 30 | + python: 3.6 |
| 31 | + before_script: |
| 32 | + - pip install tox-travis |
| 33 | + script: tox -e pytest |
| 34 | + - stage: tests |
| 35 | + name: "Documentation Tests" |
| 36 | + python: 3.6 |
| 37 | + before_script: |
| 38 | + - pip install tox-travis |
| 39 | + - wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz |
| 40 | + - tar -xvzf geckodriver-v0.24.0-linux64.tar.gz |
| 41 | + - rm geckodriver-v0.24.0-linux64.tar.gz |
| 42 | + - chmod +x geckodriver |
| 43 | + - sudo cp geckodriver /usr/local/bin/ |
| 44 | + - geckodriver --version |
| 45 | + - sudo apt-get update |
| 46 | + - sudo apt-get install firefox -y |
| 47 | + script: |
| 48 | + - tox -e docs |
| 49 | + - stage: tests |
| 50 | + name: "Python Code Security Tests" |
| 51 | + python: 3.6 |
| 52 | + before_script: |
| 53 | + - pip install tox-travis |
| 54 | + script: tox -e bandit |
| 55 | + - stage: uitests |
| 56 | + name: "Firefox UI Tests" |
| 57 | + python: 3.6 |
| 58 | + before_script: |
| 59 | + - pip install tox-travis |
| 60 | + - wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz |
| 61 | + - tar -xvzf geckodriver-v0.24.0-linux64.tar.gz |
| 62 | + - rm geckodriver-v0.24.0-linux64.tar.gz |
| 63 | + - chmod +x geckodriver |
| 64 | + - sudo cp geckodriver /usr/local/bin/ |
| 65 | + - geckodriver --version |
| 66 | + - sudo apt-get update |
| 67 | + - sudo apt-get install firefox -y |
| 68 | + script: |
| 69 | + - tox -e firefox |
| 70 | + - stage: uitests |
| 71 | + name: "Chrome UI Tests" |
| 72 | + python: 3.6 |
| 73 | + before_script: |
| 74 | + - pip install tox-travis |
| 75 | + - curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add |
| 76 | + - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list |
| 77 | + - sudo apt-get -y update |
| 78 | + - sudo apt-get -y install google-chrome-stable |
| 79 | + - wget https://chromedriver.storage.googleapis.com/76.0.3809.68/chromedriver_linux64.zip |
| 80 | + - unzip chromedriver_linux64.zip |
| 81 | + - rm chromedriver_linux64.zip |
| 82 | + - chmod +x chromedriver |
| 83 | + - sudo cp chromedriver /usr/local/bin/ |
| 84 | + - sudo chromedriver --version |
| 85 | + script: |
| 86 | + - tox -e chrome |
| 87 | + |
| 88 | + |
| 89 | +notifications: |
| 90 | + email: false |
0 commit comments