mirror of
https://github.com/wekan/wekan.git
synced 2025-12-29 21:58:49 +01:00
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: Selenium UI Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
selenium-tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
repository: omriza5/wekan-selenium
|
|
token: ${{ secrets.UI_TESTING_GITHUB_TOKEN }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Install Chrome and ChromeDriver
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y wget unzip
|
|
wget -q -O google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
sudo dpkg -i google-chrome.deb || sudo apt-get install -f -y
|
|
CHROME_VERSION=$(google-chrome --version | awk '{print $3}')
|
|
CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
|
|
wget -q -O chromedriver.zip "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
|
|
unzip chromedriver.zip
|
|
sudo mv chromedriver /usr/local/bin/
|
|
sudo chmod +x /usr/local/bin/chromedriver
|
|
env:
|
|
CHROME_BIN: /usr/bin/google-chrome
|
|
CHROMEDRIVER_BIN: /usr/local/bin/chromedriver
|
|
|
|
- name: Run Selenium tests
|
|
env:
|
|
HEADLESS: true
|
|
WEKAN_URL: http://${{ secrets.WEKAN_URL }}:80
|
|
run: |
|
|
pytest tests/ -v
|