2019-10-12 18:29:55 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: build
|
2019-10-22 07:32:15 +00:00
|
|
|
if: (NOT type IN (pull_request)) AND (branch = master)
|
2019-10-12 18:29:55 +00:00
|
|
|
language: minimal
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
script:
|
|
|
|
- docker build -t $IMAGE_NAME:$TRAVIS_COMMIT .
|
|
|
|
- echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
|
|
|
|
- docker push $IMAGE_NAME:$TRAVIS_COMMIT
|
|
|
|
- stage: deploy
|
|
|
|
if: (NOT type IN (pull_request)) AND (branch = master)
|
|
|
|
language: minimal
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
script:
|
|
|
|
- docker pull $IMAGE_NAME:$TRAVIS_COMMIT
|
|
|
|
- docker tag $IMAGE_NAME:$TRAVIS_COMMIT $IMAGE_NAME:latest
|
|
|
|
- echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
|
|
|
|
- docker push $IMAGE_NAME:latest
|
|
|
|
- stage: test
|
2019-10-22 07:32:15 +00:00
|
|
|
if: (NOT type IN (pull_request)) AND (branch = master)
|
|
|
|
sudo: required
|
|
|
|
dist: bionic
|
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- 3.6
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
- xvfb
|
|
|
|
script:
|
|
|
|
- sudo apt update
|
2020-05-25 18:29:25 +00:00
|
|
|
- sudo apt install --force-yes chromium-chromedriver
|
|
|
|
- wget https://www.dropbox.com/s/ckuoaubd1crrj2k/Linux_x64_737173_chrome-linux.zip -O chrome.zip
|
|
|
|
- unzip chrome.zip
|
|
|
|
- cd chrome-linux
|
|
|
|
- sudo rm /usr/bin/google-chrome
|
|
|
|
- sudo ln -s chrome /usr/bin/google-chrome
|
|
|
|
- cd ..
|
2019-10-22 07:32:15 +00:00
|
|
|
- pip3 install --upgrade pip
|
|
|
|
- pip3 install -U seleniumbase pytest
|
|
|
|
- docker run -d -p 127.0.0.1:8080:8080/tcp $IMAGE_NAME:$TRAVIS_COMMIT
|
|
|
|
- sleep 10
|
|
|
|
- cd tests
|
|
|
|
- pytest --headless -n 8 --reruns 10 --reruns-delay 2
|
|
|
|
- stage: pr
|
|
|
|
if: type IN (pull_request)
|
2019-10-12 18:29:55 +00:00
|
|
|
sudo: required
|
|
|
|
dist: bionic
|
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- 3.6
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
- xvfb
|
|
|
|
script:
|
|
|
|
- sudo apt update
|
2020-05-25 18:29:25 +00:00
|
|
|
- sudo apt install --force-yes chromium-chromedriver
|
|
|
|
- wget https://www.dropbox.com/s/ckuoaubd1crrj2k/Linux_x64_737173_chrome-linux.zip -O chrome.zip
|
|
|
|
- unzip chrome.zip
|
|
|
|
- cd chrome-linux
|
|
|
|
- sudo rm /usr/bin/google-chrome
|
|
|
|
- sudo ln -s chrome /usr/bin/google-chrome
|
|
|
|
- cd ..
|
2019-10-12 18:29:55 +00:00
|
|
|
- pip3 install --upgrade pip
|
|
|
|
- pip3 install -U seleniumbase pytest
|
2019-10-22 07:32:15 +00:00
|
|
|
- docker build -t $IMAGE_NAME:$TRAVIS_COMMIT .
|
2019-10-12 18:29:55 +00:00
|
|
|
- docker run -d -p 127.0.0.1:8080:8080/tcp $IMAGE_NAME:$TRAVIS_COMMIT
|
|
|
|
- sleep 10
|
|
|
|
- cd tests
|
|
|
|
- pytest --headless -n 8 --reruns 10 --reruns-delay 2
|