Skip to content

Create entry and print version #736

Create entry and print version

Create entry and print version #736

Workflow file for this run

name: SeleniumLibrary CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: [3.8, 3.11] # 3.12, pypy-3.9
rf-version: [5.0.1, 6.1.1, 7.0]
selenium-version: [4.14.0, 4.15.2, 4.16.0, 4.17.2, 4.18.1, 4.19.0]
browser: [firefox, chrome, headlesschrome] #edge
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} with Robot Framework ${{ matrix.rf-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: latest
id: setup-chrome
- run: |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
${{ steps.setup-chrome.outputs.chrome-path }} --version
- name: Setup firefox
id: setup-firefox
uses: browser-actions/setup-firefox@v1
with:
firefox-version: latest
- run: |
echo Installed firefox versions: ${{ steps.setup-firefox.outputs.firefox-version }}
${{ steps.setup-firefox.outputs.firefox-path }} --version
- name: Start xvfb
run: |
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
- name: Install dependencies
if: matrix.python-version != 'pypy-3.7'
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Install dependencies for pypy
if: matrix.python-version == 'pypy-3.9'
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install robotstatuschecker>=1.4
pip install requests robotframework-pabot
- name: Install Seleninum v${{ matrix.selenium-version }}
run: |
pip install --upgrade selenium==${{ matrix.selenium-version }}
- name: Install RF ${{ matrix.rf-version }}
run: |
pip install -U --pre robotframework==${{ matrix.rf-version }}
- name: Install drivers via selenium-manager
run: |
SELENIUM_MANAGER_EXE=$(python -c 'from selenium.webdriver.common.selenium_manager import SeleniumManager; sm=SeleniumManager(); print(f"{str(sm.get_binary())}")')
echo "$SELENIUM_MANAGER_EXE"
echo "WEBDRIVERPATH=$($SELENIUM_MANAGER_EXE --browser chrome --debug | awk '/INFO[[:space:]]Driver path:/ {print $NF;exit}')" >> "$GITHUB_ENV"
echo "$WEBDRIVERPATH"
- name: Generate stub file for ${{ matrix.python-version }}
if: matrix.python-version != 'pypy-3.9'
run: |
invoke gen-stub
# Temporarily ignoring pypy execution
- name: Run tests with headless Chrome and with PyPy
if: startsWith( matrix.python-version, 'pypy') == true
run: |
xvfb-run --auto-servernum python atest/run.py --nounit --zip headlesschrome
- name: Run tests with ${{ matrix.browser }} if CPython
if: startsWith( matrix.python-version, 'pypy') == false
run: |
xvfb-run --auto-servernum python atest/run.py --zip ${{ matrix.browser }}
# - name: Run tests with Selenium Grid
# if: matrix.python-version == '3.11' && matrix.rf-version == '3.2.2' && matrix.python-version != 'pypy-3.9'
# run: |
# wget --no-verbose --output-document=./selenium-server-standalone.jar http://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
# sudo chmod u+x ./selenium-server-standalone.jar
# xvfb-run --auto-servernum python atest/run.py --zip headlesschrome --grid True
- uses: actions/upload-artifact@v1
if: failure()
with:
name: SeleniumLibrary Test results
path: atest/zip_results