behave-framework/.gitea/workflows/chrome-tests.yml
Greg Gauthier ab11976ec5
All checks were successful
EdgeTests / build (3.12) (push) Successful in 1m5s
Pylint / build (3.12) (push) Successful in 10s
try a back-leveled version of the gitea image
2024-07-24 13:14:57 +01:00

65 lines
2.0 KiB
YAML

name: ChromeTests
on: [ push ]
jobs:
build:
runs-on: node16-bullseye
strategy:
matrix:
python-version: [ "3.12" ]
env:
CHROMEDRIVER_VERSION: 113.0.5672.63
CHROME_VERSION: 113.0.5672.0
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
mkdir drivers
- name: Prep the host environment for Chrome
run: |
apt update -y
apt upgrade -y
apt install -y fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libu2f-udev libcups2 libdrm2\
libgbm1 libgtk-3-0 libgtk-4-1 libnspr4 libnss3 libu2f-udev libvulkan1 libxcomposite1 libxdamage1 libxfixes3\
libxkbcommon0 libxrandr2 xdg-utils xvfb libx11-6 libx11-dev libice6 xorg xorg-dev
- name: Install Chrome and Chromedriver for Linux
if: runner.os == 'Linux'
run: |
wget https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chrome-linux64.zip
wget https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
unzip chrome-linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver chrome-linux64
- name: Verify Installation
run: |
export PATH=$PATH:${{gitea.workspace}}/chrome-linux64
which chrome
which chromedriver
chrome --version
chromedriver --version
- name: Run the pytests
run: |
export PATH=$PATH:${{gitea.workspace}}/chrome-linux64
export PATH=$PATH:${{gitea.workspace}}/drivers
pytest -vv -c pytest.ini -m chrome
- name: Run the behave tests
run: behave --tags=mark.chrome