Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Testing #3787

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
! try just workflow for chromedriver
Spuds committed Apr 14, 2024
commit 4ca4bc80facdbf05d7a7ea43190978408936d1ad
29 changes: 12 additions & 17 deletions .github/setup-selenium.sh
Original file line number Diff line number Diff line change
@@ -29,32 +29,27 @@ sudo mkdir -p $(dirname "$SELENIUM_JAR")
sudo wget -nv -O "$SELENIUM_JAR" "$SELENIUM_DOWNLOAD_URL"
sudo chmod 777 "$SELENIUM_JAR"

# Install Fx or Chrome
# Install Chrome
echo "Installing Browser"

# Available Chrome Versions
# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable?id=202706
#
# Current Versions for Ref
# Selenium 3.141.59 jar
# Chrome 123.0.6312.58
# ChromeDriver 123.0.6312.58
#
CHROME_VERSION='123.0.6312.58-1' # '91.0.4472.114-1'

CHROME_VERSION='123.0.6312.58-1'
wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb -q
sudo dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb

# Download Chrome Driver
echo "Downloading chromedriver"
CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
&& CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
&& wget -nv -O "$CHROMEDRIVER_ZIP" "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
&& unzip "$CHROMEDRIVER_ZIP" \
&& rm -rf "$CHROMEDRIVER_ZIP" \
&& sudo mv chromedriver /usr/local/bin/chromedriver \
&& sudo chmod +x /usr/local/bin/chromedriver \
&& chromedriver --version
# https://chromedriver.storage.googleapis.com/${VERSION}/chromedriver_linux64.zip"
#echo "Downloading chromedriver"
#CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
# && CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
# && wget -nv -O "$CHROMEDRIVER_ZIP" "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
# && unzip "$CHROMEDRIVER_ZIP" \
# && rm -rf "$CHROMEDRIVER_ZIP" \
# && sudo mv chromedriver /usr/local/bin/chromedriver \
# && sudo chmod +x /usr/local/bin/chromedriver \
# && chromedriver --version

# Start Selenium using default chosen webdriver
export DISPLAY=:99.0
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -78,6 +78,9 @@ jobs:
run: .github/setup-elkarte.sh $DB $PHP_VERSION
working-directory: ./elkarte

- name: Setup ChromeDriver
uses: nanasess/setup-chromedriver@v2

- name: Run Unit Tests
env:
DB: ${{ matrix.db }}