[241122] 디바이스팜에 필요한 패키지 설치 #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Selenium Tests | |
on: | |
push: | |
branches: | |
- main | |
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.85/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 -m unittest web/Tests/main_test.py |