Skip to content
Draft
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
11 changes: 7 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
node-
- name: Build cldr-apps-webdriver with Maven
run: >
mvn -s .github/workflows/mvn-settings.xml -B compile install package --file tools/pom.xml -pl cldr-apps-webdriver
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Images
run: docker compose pull -q
working-directory: tools/cldr-apps
Expand All @@ -315,13 +321,10 @@ jobs:
- name: Bringup Containers
run: docker compose up -d cldr-apps selenium
working-directory: tools/cldr-apps
- name: Build webdriver
run: docker compose run -v ~/.m2/repository:/root/.m2/repository:rw --rm webdriver mvn -B test-compile
working-directory: tools/cldr-apps
- name: Test with Webdriver
# See tools/cldr-apps/README.md
run: >
docker compose run -v ~/.m2/repository:/root/.m2/repository:rw --rm webdriver || ( docker compose exec -it cldr-apps tail /logs/messages.log ; true )
docker compose run --rm webdriver || ( docker compose exec -it cldr-apps tail /logs/messages.log ; true )
Copy link
Member

Choose a reason for hiding this comment

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

main failure occurs here?

Copy link
Member

Choose a reason for hiding this comment

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

org.openqa.selenium.SessionNotCreatedException "Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure." caused by java.nio.channels.ClosedChannelException "I/O operation on a channel that has already been closed"

working-directory: tools/cldr-apps
- name: Prepare client tests
run: docker run --rm -v ~/.npm:/root/.npm:rw -v $(pwd)/js:/home/node/app:rw -w /home/node/app node npm ci
Expand Down
6 changes: 3 additions & 3 deletions tools/cldr-apps-webdriver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM maven:3-eclipse-temurin-17-alpine

# TODO: copy pom.xml and predownload
WORKDIR /workarea
COPY . /workarea
# COPY . /workarea
COPY surveydriver-docker.properties /workarea/surveydriver.properties
CMD ["mvn", "-B", "test"]
COPY target/cldr-apps-webdriver.jar /workarea/cldr-apps-webdriver.jar
CMD ["java", "-jar", "cldr-apps-webdriver.jar"]
89 changes: 59 additions & 30 deletions tools/cldr-apps-webdriver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@
</licenses>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<spotless.version>2.43.0</spotless.version>
<google-java-style.version>1.27.0</google-java-style.version>
<mainClass>org.unicode.cldr.surveydriver.SurveyDriver</mainClass>
</properties>

<parent>
<groupId>org.unicode.cldr</groupId>
<artifactId>cldr-all</artifactId>
<version>49.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.32.0</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
Expand All @@ -46,30 +49,56 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- exclude other manifests -->
<exclude>META-INF/MANIFEST.MF</exclude>
<!-- don't care about modules for this purpose -->
<exclude>module-info.class</exclude>
</excludes>
</filter>
</filters>
<minimizeJar>false</minimizeJar>
<finalName>${project.artifactId}</finalName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${mainClass}</mainClass>
<manifestEntries>
<Main-Class>${mainClass}</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
<!-- You can explicitly disable ratchet functionality by providing the value 'NONE': -->
<ratchetFrom>NONE</ratchetFrom>
<!-- define a language-specific format -->
<java>
<toggleOffOn />
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<!-- version of google-java-style -->
<version>${google-java-style.version}</version>
<style>AOSP</style>
<reflowLongStrings>false</reflowLongStrings>
</googleJavaFormat>
</java>
</configuration>
</plugin>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.unicode.cldr.surveydriver;

import static org.junit.Assert.assertTrue;

import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
Expand Down Expand Up @@ -56,6 +54,10 @@
*/
public class SurveyDriver {

static void assertTrue(boolean t) {
if (!t) throw new RuntimeException("Expected true but got false");
}

/*
* Enable/disable specific tests using these booleans
*/
Expand Down Expand Up @@ -99,6 +101,10 @@ public class SurveyDriver {

private boolean gotComprehensiveCoverage = false;

public static void main(String args[]) {
runTests();
}

public static void runTests() {
SurveyDriver s = new SurveyDriver();
s.setUp();
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions tools/cldr-apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
<packaging>war</packaging>
<name>CLDR Survey Tool</name>

<url>https://unicode.org/cldr</url>

<scm>
<connection>scm:git:https://github.com/unicode-org/cldr.git</connection>
</scm>

<properties>
<!-- openliberty -->
<jakarta-version>8.0.0</jakarta-version>
Expand Down
7 changes: 7 additions & 0 deletions tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<url>https://cldr.unicode.org</url>

<scm>
<connection>scm:git:https://github.com/unicode-org/cldr.git</connection>
</scm>

<groupId>org.unicode.cldr</groupId>
<artifactId>cldr-all</artifactId>
<version>49.0-SNAPSHOT</version>
Expand Down Expand Up @@ -83,6 +89,7 @@
<module>cldr-apps</module>
<module>cldr-rdf</module>
<module>../docs/charts/keyboards</module>
<module>cldr-apps-webdriver</module>
</modules>

<dependencyManagement>
Expand Down
Loading