|
| 1 | +name: CI build for Legacy Python |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - master |
| 9 | + workflow_dispatch: |
| 10 | + branches: |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + |
| 15 | + env: |
| 16 | + PY_COLORS: "1" |
| 17 | + runs-on: ubuntu-20.04 |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + max-parallel: 6 |
| 21 | + matrix: |
| 22 | + python-version: ["3.6"] |
| 23 | + |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v3 |
| 26 | + - name: Set up Python ${{ matrix.python-version }} |
| 27 | + uses: actions/setup-python@v4 |
| 28 | + with: |
| 29 | + python-version: ${{ matrix.python-version }} |
| 30 | + - name: Install dependencies |
| 31 | + run: | |
| 32 | + python -m pip install --upgrade pip |
| 33 | + python -m pip install --upgrade wheel |
| 34 | + pip install -r requirements.txt |
| 35 | + - name: Install SeleniumBase |
| 36 | + run: | |
| 37 | + python setup.py install |
| 38 | + - name: Lint with flake8 |
| 39 | + run: | |
| 40 | + pip install flake8 |
| 41 | + # Stop the build if there are flake8 issues |
| 42 | + flake8 . --count --show-source --statistics --exclude=temp |
| 43 | + - name: Install Chrome |
| 44 | + run: | |
| 45 | + sudo apt install google-chrome-stable |
| 46 | + - name: Check the console scripts interface |
| 47 | + run: | |
| 48 | + seleniumbase |
| 49 | + sbase |
| 50 | + - name: Install chromedriver |
| 51 | + run: | |
| 52 | + seleniumbase install chromedriver |
| 53 | + - name: Make sure pytest is working |
| 54 | + run: | |
| 55 | + echo "def test_1(): pass" > nothing.py |
| 56 | + pytest nothing.py |
| 57 | + - name: Make sure nosetests is working |
| 58 | + run: | |
| 59 | + echo "def test_2(): pass" > nothing2.py |
| 60 | + nosetests nothing2.py |
| 61 | + - name: Run pytest examples/unit_tests/verify_framework.py --browser=chrome --headless |
| 62 | + run: | |
| 63 | + pytest examples/unit_tests/verify_framework.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 64 | + - name: Run pytest examples/boilerplate_test.py --browser=chrome --headless |
| 65 | + run: | |
| 66 | + pytest examples/boilerplates/boilerplate_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 67 | + - name: Run pytest examples/test_demo_site.py --browser=chrome --xvfb |
| 68 | + run: | |
| 69 | + pytest examples/test_demo_site.py --browser=chrome --xvfb -v -s --junit-xml=junit/test-results.xml |
| 70 | + - name: Run pytest examples/test_iframes.py --browser=chrome --xvfb --rs --crumbs |
| 71 | + run: | |
| 72 | + pytest examples/test_iframes.py --browser=chrome --xvfb --rs --crumbs -v -s --junit-xml=junit/test-results.xml |
| 73 | + - name: Run pytest examples/test_mfa_login.py --browser=chrome --xvfb |
| 74 | + run: | |
| 75 | + pytest examples/test_mfa_login.py --browser=chrome --xvfb -v -s --junit-xml=junit/test-results.xml |
| 76 | + - name: Run pytest examples/test_iframes.py --browser=chrome --xvfb --rs |
| 77 | + run: | |
| 78 | + pytest examples/test_iframes.py --browser=chrome --xvfb --rs -v -s --junit-xml=junit/test-results.xml |
| 79 | + - name: Run pytest examples/test_window_switching.py --browser=chrome --headless |
| 80 | + run: | |
| 81 | + pytest examples/test_window_switching.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 82 | + - name: Run pytest examples/my_first_test.py --browser=chrome --headless |
| 83 | + run: | |
| 84 | + pytest examples/my_first_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 85 | + - name: Run pytest examples/test_inspect_html.py --browser=chrome --headless |
| 86 | + run: | |
| 87 | + pytest examples/test_inspect_html.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml |
| 88 | + - name: Run behave examples/behave_bdd/features/calculator.feature -D rs -D crumbs -D xvfb |
| 89 | + run: | |
| 90 | + behave examples/behave_bdd/features/calculator.feature -D rs -D crumbs -D xvfb -T -k |
| 91 | + - name: Run behave examples/behave_bdd/features/realworld.feature -D rs -D crumbs -D xvfb |
| 92 | + run: | |
| 93 | + behave examples/behave_bdd/features/realworld.feature -D rs -D crumbs -D xvfb -T -k |
0 commit comments