|
| 1 | +name: SeleniumBase Python package test |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + |
| 8 | + runs-on: ubuntu-16.04 |
| 9 | + strategy: |
| 10 | + max-parallel: 4 |
| 11 | + matrix: |
| 12 | + python-version: [2.7, 3.5, 3.6, 3.7] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v1 |
| 16 | + - name: Set up Python ${{ matrix.python-version }} |
| 17 | + uses: actions/setup-python@v1 |
| 18 | + with: |
| 19 | + python-version: ${{ matrix.python-version }} |
| 20 | + - name: Install dependencies |
| 21 | + run: | |
| 22 | + python -m pip install --upgrade pip |
| 23 | + pip install -r requirements.txt |
| 24 | + - name: Install SeleniumBase |
| 25 | + run: | |
| 26 | + python setup.py install |
| 27 | + - name: Lint with flake8 |
| 28 | + run: | |
| 29 | + pip install flake8 |
| 30 | + # Stop the build if there are flake8 issues |
| 31 | + flake8 . --count --show-source --statistics --exclude=temp |
| 32 | + - name: Install Chrome and Firefox |
| 33 | + run: | |
| 34 | + sudo apt install google-chrome-stable |
| 35 | + sudo apt-get install firefox |
| 36 | + - name: Install chromedriver and geckodriver (Firefox Webdriver) |
| 37 | + run: | |
| 38 | + seleniumbase install chromedriver |
| 39 | + seleniumbase install geckodriver |
| 40 | + - name: Make sure pytest is working |
| 41 | + run: | |
| 42 | + echo "def test_1(): pass" > nothing.py |
| 43 | + pytest nothing.py |
| 44 | + - name: Run pytest boilerplate_test.py --browser=chrome --headless |
| 45 | + run: | |
| 46 | + pytest examples/boilerplates/boilerplate_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 47 | + - name: Run pytest my_first_test.py --browser=chrome --headless |
| 48 | + run: | |
| 49 | + pytest examples/my_first_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 50 | + - name: Run pytest test_inspect_html.py --browser=chrome --headless |
| 51 | + run: | |
| 52 | + pytest examples/test_inspect_html.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 53 | + - name: Run pytest my_first_test.py --browser=firefox --headless |
| 54 | + run: | |
| 55 | + pytest examples/my_first_test.py --browser=firefox --headless -v -s --junit-xml=junit/test-results.xml |
0 commit comments