2024-07-23 19:33:29 +00:00
|
|
|
name: ChromeTests
|
|
|
|
|
|
|
|
on: [ push ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-07-24 11:32:49 +00:00
|
|
|
runs-on: python-chromedriver
|
2024-07-23 19:33:29 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [ "3.12" ]
|
|
|
|
env:
|
2024-07-23 21:34:57 +00:00
|
|
|
CHROMEDRIVER_VERSION: 113.0.5672.63
|
2024-07-23 20:57:30 +00:00
|
|
|
CHROME_VERSION: 113.0.5672.0
|
2024-07-23 19:33:29 +00:00
|
|
|
steps:
|
2024-07-24 11:39:32 +00:00
|
|
|
- name: Install Node 20
|
|
|
|
run: |
|
|
|
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
|
|
|
nvm install 20
|
2024-07-24 11:42:17 +00:00
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
2024-07-24 11:39:32 +00:00
|
|
|
node -v
|
|
|
|
npm -v
|
|
|
|
|
2024-07-23 19:33:29 +00:00
|
|
|
- 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
|
|
|
|
|
2024-07-23 20:08:35 +00:00
|
|
|
- name: Prep the Debian repositories
|
|
|
|
run: |
|
|
|
|
apt update -y
|
|
|
|
apt upgrade -y
|
2024-07-23 21:24:26 +00:00
|
|
|
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\
|
2024-07-24 11:04:09 +00:00
|
|
|
libxkbcommon0 libxrandr2 xdg-utils xvfb libx11-6 libx11-dev libice6 xorg xorg-dev
|
2024-07-23 21:14:01 +00:00
|
|
|
|
2024-07-23 20:08:35 +00:00
|
|
|
|
2024-07-23 19:37:33 +00:00
|
|
|
- name: Install Chrome and Chromedriver for Linux
|
2024-07-23 19:33:29 +00:00
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
2024-07-23 20:57:30 +00:00
|
|
|
wget https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chrome-linux64.zip
|
2024-07-23 20:04:51 +00:00
|
|
|
wget https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
|
2024-07-23 20:57:30 +00:00
|
|
|
unzip chrome-linux64.zip
|
2024-07-23 20:08:35 +00:00
|
|
|
unzip chromedriver_linux64.zip
|
2024-07-24 09:40:41 +00:00
|
|
|
mv chromedriver chrome-linux64
|
2024-07-23 19:33:29 +00:00
|
|
|
|
2024-07-23 20:39:33 +00:00
|
|
|
- name: Verify Installation
|
|
|
|
run: |
|
2024-07-23 21:11:37 +00:00
|
|
|
export PATH=$PATH:${{gitea.workspace}}/chrome-linux64
|
2024-07-23 20:57:30 +00:00
|
|
|
which chrome
|
2024-07-24 09:40:41 +00:00
|
|
|
which chromedriver
|
2024-07-23 20:57:30 +00:00
|
|
|
chrome --version
|
|
|
|
chromedriver --version
|
2024-07-23 20:39:33 +00:00
|
|
|
|
2024-07-23 19:33:29 +00:00
|
|
|
- name: Run the pytests
|
2024-07-23 21:19:37 +00:00
|
|
|
run: |
|
2024-07-23 21:17:33 +00:00
|
|
|
export PATH=$PATH:${{gitea.workspace}}/chrome-linux64
|
|
|
|
export PATH=$PATH:${{gitea.workspace}}/drivers
|
2024-07-24 09:52:33 +00:00
|
|
|
pytest -vv -c pytest.ini -m chrome
|
2024-07-23 21:17:33 +00:00
|
|
|
|
2024-07-23 19:33:29 +00:00
|
|
|
|
|
|
|
- name: Run the behave tests
|
|
|
|
run: behave --tags=mark.chrome
|