WebRunner Dev #89
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: WebRunner Dev | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| pull_request: | |
| branches: [ "dev" ] | |
| schedule: | |
| - cron: "0 7 * * *" | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit-test: | |
| name: Unit Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| pip install -r dev_requirements.txt | |
| pip install pytest | |
| - name: Run unit tests | |
| run: python -m pytest test/unit_test/test_*.py -v | |
| - name: Run integration tests | |
| # Each subprocess test sets its own timeout; pytest-timeout isn't a dep. | |
| run: python -m pytest test/integration_test/ -v | |
| integration-test: | |
| name: Integration Tests (Python ${{ matrix.python-version }}) | |
| needs: unit-test | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| env: | |
| # webdriver-manager calls api.github.com to find geckodriver/chromedriver | |
| # releases; the unauthenticated quota (60/h per IP) gets hammered in CI. | |
| # Pass the workflow token so requests use the 5000/h authenticated limit. | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| pip install -r dev_requirements.txt | |
| - name: Install Firefox | |
| run: | | |
| $SourceURL = "https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US"; | |
| $Installer = $env:TEMP + "\firefox.exe"; | |
| Invoke-WebRequest $SourceURL -OutFile $Installer; | |
| Start-Process -FilePath $Installer -Args "/s" -Verb RunAs -Wait; | |
| Remove-Item $Installer; | |
| - name: Test Start Webdriver | |
| run: python ./test/unit_test/start_webdriver_test/get_webdriver.py | |
| - name: Test Start Webdriver With Options | |
| run: python ./test/unit_test/start_webdriver_with_options/webdriver_with_options.py | |
| - name: Test Desired Capabilities | |
| run: python ./test/unit_test/desired_capabilities_test/desired_capabilities_test.py | |
| - name: Test Find And Click | |
| run: python ./test/unit_test/find_and_click_test/find_and_click_test.py | |
| - name: Test Multi Webdriver | |
| run: python ./test/unit_test/multi_driver_test/multi_driver_test.py | |
| - name: Test Start Webdriver And Assert Title | |
| run: python ./test/unit_test/start_webdriver_and_asset_title_test/title_test.py | |
| - name: Test TestObject | |
| run: python ./test/unit_test/test_object_test/test_object_test.py | |
| - name: Test Record Class | |
| run: python ./test/unit_test/test_record_class_test/test_record_class_test.py | |
| - name: Test Check Value | |
| run: python ./test/unit_test/check_value_test/check_value_test.py | |
| - name: Test Switch | |
| run: python ./test/unit_test/switch_test/switch_test.py | |
| - name: Test Close Choose Webdriver | |
| run: python ./test/unit_test/close_choose_webdriver_test/close_choose_webdriver_test.py | |
| - name: Test Redirect | |
| run: python ./test/unit_test/redirect_test/redirect_test.py | |
| - name: Test Cookie | |
| run: python ./test/unit_test/cookie_test/cookie_test.py | |
| - name: Test Set Timeout | |
| run: python ./test/unit_test/set_timeout_test/set_timeout_test.py | |
| - name: Test Action Chain | |
| run: python ./test/unit_test/action_chains_test/action_chains_test.py | |
| - name: Test Window | |
| run: python ./test/unit_test/window_test/window_test.py | |
| - name: Test Screenshot | |
| run: python ./test/unit_test/screenshot_test/screenshot_test.py | |
| - name: Test Executor | |
| run: python ./test/unit_test/executor_test/executor_test.py | |
| - name: Test Argparse | |
| run: python ./test/unit_test/argparse/argparse_test.py | |
| - name: Test Generate HTML Report | |
| run: python ./test/unit_test/report_test/html_report_test.py | |
| - name: Test Generate JSON Report | |
| run: python ./test/unit_test/report_test/json_report_test.py | |
| - name: Test Generate XML Report | |
| run: python ./test/unit_test/report_test/xml_report_test.py | |
| - name: Test Callback | |
| run: python ./test/unit_test/callback/callback_test.py |