Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
56 changes: 30 additions & 26 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,32 @@ jobs:
run:
shell: bash -l {0}
env:
ZEPPELIN_SELENIUM_BROWSER: firefox
ZEPPELIN_SELENIUM_BROWSER: "edge"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Firefox (non-snap) and geckodriver
run: |
sudo snap remove firefox || true
sudo add-apt-repository -y ppa:mozillateam/ppa
sudo tee -a /etc/apt/preferences.d/mozilla-firefox <<EOF
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
EOF
sudo apt-get update
sudo apt-get install -y firefox
GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep tag_name | cut -d '"' -f 4)
wget -q https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz
tar -xzf geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz
chmod +x geckodriver
sudo mv geckodriver /usr/local/bin/
geckodriver --version
firefox --version
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm
- name: Set up Edge browser
uses: browser-actions/setup-edge@v1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used official browser actions to setup Edge driver.

- name: Print Edge version
run: msedgedriver --version
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: |
~/.m2/repository
!~/.m2/repository/org/apache/zeppelin/
~/.spark-dist
~/.cache
key: ${{ runner.os }}-zeppelin-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-zeppelin-
Comment on lines +117 to +132
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted this part to align it with other jobs

- name: Setup conda environment with python 3.9 and R
uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -136,19 +140,19 @@ jobs:
channel-priority: strict
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "IRkernel::installspec()"
- name: Install Environment
run: |
./mvnw clean install -DskipTests -am -pl zeppelin-integration -Pweb-classic -Pintegration -Pspark-scala-2.12 -Pspark-3.5 -Pweb-dist ${MAVEN_ARGS}
- name: Print browser version
run: |
echo "Firefox version:"
firefox --version
echo "GeckoDriver version:"
geckodriver --version
- name: Run integration tests with Firefox
- name: run tests
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1600x1024x16" \
./mvnw verify -DfailIfNoTests=false \
-pl zeppelin-integration \
-Pweb-classic -Pintegration -Pspark-scala-2.12 -Pspark-3.5 -Pweb-dist -Pusing-source-tree \
${MAVEN_ARGS}
- name: Print zeppelin logs
if: always()
run: if [ -d "logs" ]; then cat logs/*; fi
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
Expand All @@ -45,7 +46,7 @@
import org.slf4j.LoggerFactory;

// This class auto discovery the available WebDriver in the following priority:
// Chrome, Firefox, Safari.
// Chrome, Edge, Firefox, Safari.
//
// You can also use the environment variable ZEPPELIN_SELENIUM_BROWSER to choose a specific one.
// For example, unlike Chromium and Firefox drivers, Safari's WebDriver is pre-installed on macOS,
Expand Down Expand Up @@ -89,6 +90,14 @@ private WebDriver constructWebDriver(int port) {
return null;
}
};
Supplier<WebDriver> edgeDriverSupplier = () -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also update the comment at line 49

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added it, thanks!

try {
return new EdgeDriver();
} catch (Exception e) {
LOG.error("Exception in WebDriverManager while EdgeDriver ", e);
return null;
}
};
Supplier<WebDriver> firefoxDriverSupplier = () -> {
try {
return getFirefoxDriver();
Expand All @@ -111,14 +120,17 @@ private WebDriver constructWebDriver(int port) {
case "chrome":
driver = chromeDriverSupplier.get();
break;
case "edge":
driver = edgeDriverSupplier.get();
break;
case "firefox":
driver = firefoxDriverSupplier.get();
break;
case "safari":
driver = safariDriverSupplier.get();
break;
default:
driver = Stream.of(chromeDriverSupplier, firefoxDriverSupplier, safariDriverSupplier)
driver = Stream.of(chromeDriverSupplier, edgeDriverSupplier, firefoxDriverSupplier, safariDriverSupplier)
.map(Supplier::get)
.filter(Objects::nonNull)
.findFirst()
Expand Down
Loading