Skip to content

Commit 8a80b50

Browse files
committed
Add nightly tests
1 parent 27554a2 commit 8a80b50

File tree

3 files changed

+192
-0
lines changed

3 files changed

+192
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Nightly Tests (macOS)
2+
3+
on:
4+
schedule:
5+
- cron: "40 1 * * *"
6+
workflow_dispatch:
7+
branches:
8+
9+
jobs:
10+
build:
11+
12+
env:
13+
PY_COLORS: "1"
14+
runs-on: macos-latest
15+
strategy:
16+
fail-fast: false
17+
max-parallel: 6
18+
matrix:
19+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install --upgrade wheel
31+
pip install -r requirements.txt
32+
- name: Install SeleniumBase
33+
run: |
34+
python setup.py install
35+
- name: Check the console scripts interface
36+
run: |
37+
seleniumbase
38+
sbase
39+
- name: Install chromedriver
40+
run: |
41+
seleniumbase install chromedriver
42+
- name: Make sure pytest is working
43+
run: |
44+
echo "def test_1(): pass" > nothing.py
45+
pytest nothing.py
46+
- name: Make sure nosetests is working
47+
run: |
48+
echo "def test_2(): pass" > nothing2.py
49+
nosetests nothing2.py
50+
- name: Run pytest examples/unit_tests/verify_framework.py --browser=chrome --headless
51+
run: |
52+
pytest examples/unit_tests/verify_framework.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
53+
- name: Run pytest examples/offline_examples --browser=chrome --headless --rs
54+
run: |
55+
pytest examples/offline_examples --rs --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
56+
- name: Run pytest examples/boilerplate_test.py --browser=chrome --headless
57+
run: |
58+
pytest examples/boilerplates/boilerplate_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
59+
- name: Run pytest examples/test_window_switching.py --browser=chrome --headless
60+
run: |
61+
pytest examples/test_window_switching.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
62+
- name: Verify seleniumbase install from PyPI
63+
run: |
64+
pip install seleniumbase -U --no-deps --force-reinstall --no-cache-dir
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Nightly Tests (Ubuntu)
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *"
6+
workflow_dispatch:
7+
branches:
8+
9+
jobs:
10+
build:
11+
12+
env:
13+
PY_COLORS: "1"
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
max-parallel: 6
18+
matrix:
19+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install --upgrade wheel
31+
pip install -r requirements.txt
32+
- name: Install SeleniumBase
33+
run: |
34+
python setup.py install
35+
- name: Check the console scripts interface
36+
run: |
37+
seleniumbase
38+
sbase
39+
- name: Install chromedriver
40+
run: |
41+
seleniumbase install chromedriver
42+
- name: Make sure pytest is working
43+
run: |
44+
echo "def test_1(): pass" > nothing.py
45+
pytest nothing.py
46+
- name: Make sure nosetests is working
47+
run: |
48+
echo "def test_2(): pass" > nothing2.py
49+
nosetests nothing2.py
50+
- name: Run pytest examples/unit_tests/verify_framework.py --browser=chrome --headless
51+
run: |
52+
pytest examples/unit_tests/verify_framework.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
53+
- name: Run pytest examples/offline_examples --browser=chrome --headless --rs
54+
run: |
55+
pytest examples/offline_examples --rs --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
56+
- name: Run pytest examples/boilerplate_test.py --browser=chrome --headless
57+
run: |
58+
pytest examples/boilerplates/boilerplate_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
59+
- name: Run pytest examples/test_window_switching.py --browser=chrome --headless
60+
run: |
61+
pytest examples/test_window_switching.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
62+
- name: Verify seleniumbase install from PyPI
63+
run: |
64+
pip install seleniumbase -U --no-deps --force-reinstall --no-cache-dir
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Nightly Tests (Windows)
2+
3+
on:
4+
schedule:
5+
- cron: "50 1 * * *"
6+
workflow_dispatch:
7+
branches:
8+
9+
jobs:
10+
build:
11+
12+
env:
13+
PY_COLORS: "1"
14+
runs-on: windows-latest
15+
strategy:
16+
fail-fast: false
17+
max-parallel: 6
18+
matrix:
19+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install --upgrade wheel
31+
pip install -r requirements.txt
32+
- name: Install SeleniumBase
33+
run: |
34+
python setup.py install
35+
- name: Check the console scripts interface
36+
run: |
37+
seleniumbase
38+
sbase
39+
- name: Install chromedriver
40+
run: |
41+
seleniumbase install chromedriver
42+
- name: Make sure pytest is working
43+
run: |
44+
echo "def test_1(): pass" > nothing.py
45+
pytest nothing.py
46+
- name: Make sure nosetests is working
47+
run: |
48+
echo "def test_2(): pass" > nothing2.py
49+
nosetests nothing2.py
50+
- name: Run pytest examples/unit_tests/verify_framework.py --browser=chrome --headless
51+
run: |
52+
pytest examples/unit_tests/verify_framework.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
53+
- name: Run pytest examples/offline_examples --browser=chrome --headless --rs
54+
run: |
55+
pytest examples/offline_examples --rs --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
56+
- name: Run pytest examples/boilerplate_test.py --browser=chrome --headless
57+
run: |
58+
pytest examples/boilerplates/boilerplate_test.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
59+
- name: Run pytest examples/test_window_switching.py --browser=chrome --headless
60+
run: |
61+
pytest examples/test_window_switching.py --browser=chrome --headless -v -s --junit-xml=junit/test-results.xml
62+
- name: Verify seleniumbase install from PyPI
63+
run: |
64+
pip install seleniumbase -U --no-deps --force-reinstall --no-cache-dir

0 commit comments

Comments
 (0)