Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Koaha committed Nov 25, 2024
1 parent 738d7fb commit b461e59
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
pip install --upgrade setuptools importlib-metadata
pip install -e .
- name: Install Chrome and dependencies
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable libnss3 xvfb
# - name: Install Chrome and dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y google-chrome-stable libnss3 xvfb

# - name: Install Chromedriver
# run: |
Expand All @@ -49,31 +49,22 @@ jobs:
# run: |
# pip install webdriver-manager
# python -c "from webdriver_manager.chrome import ChromeDriverManager; print(ChromeDriverManager().install())"
- name: Install Specific Version of Google Chrome and Chromedriver
- name: Set up Google Chrome
run: |
# Define specific versions
CHROME_VERSION="116.0.5845.111" # Replace with a desired Chrome version
CHROMEDRIVER_VERSION="116.0.5845.96" # Corresponding Chromedriver version
# Install specific version of Google Chrome
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb
sudo dpkg -i google-chrome-stable_${CHROME_VERSION}-1_amd64.deb || sudo apt-get -f install -y
# Validate Chrome installation
google-chrome --version
sudo apt-get install google-chrome-stable libnss3 xvfb
# Install specific version of Chromedriver
wget https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
- name: Install ChromeDriver
run: |
CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+\.\d+')
CHROMEDRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
wget -N https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/
sudo chmod +x /usr/local/bin/chromedriver
# Validate Chromedriver installation
chromedriver --version
- name: Run tests with coverage
env:
DISPLAY: :99.0
Expand Down

0 comments on commit b461e59

Please sign in to comment.