-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.43 KB
/
selenium-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Run Selenium Tests
on:
push:
branches:
- main
pull_request:
jobs:
selenium-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set environment variables
run: echo "ENV=production" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r web/requirements.txt
- name: Install Chrome
run: |
set -ex
sudo apt-get update -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
sudo apt-get install -y -f
- name: Setup ChromeDriver
run: |
wget https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.69/linux64/chromedriver-linux64.zip
unzip chromedriver-linux64.zip
sudo mv ./chromedriver-linux64/chromedriver /usr/local/bin/
sudo chmod +x /usr/local/bin/chromedriver
- name: Setup Xvfb
run: |
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99
- name: Run Selenium Tests
run: |
mkdir -p /tmp/selenium/user-data-dir
python web/home_002.py