Skip to content
Open
154 changes: 145 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,155 @@
# limitations under the License.
#

name: CI

on: [push, pull_request]
name: Build & Deploy

on:
push:
branches:
- dev
- main
- issue/11
# paths-ignore:
# - "README.md"
jobs:
build:
build-jdk11:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Compile with Maven
run: mvn compile -ntp
build-jdk17:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Compile with Maven
run: mvn compile -ntp
build-jdk21:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Compile with Maven
run: mvn compile -ntp

# TODO: cache dependencies (taking into accounts: Maven plugins, snapshots, etc.)
check-versions:
runs-on: ubuntu-latest
needs: [ build-jdk11, build-jdk17, build-jdk21 ]
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Check versions with Maven
run: mvn versions:display-dependency-updates -ntp

- name: Build with Maven
run: JAVA_HOME=$JAVA_HOME_8_X64 mvn -V -B -ntp -U -e verify
test-jdk11:
runs-on: ubuntu-latest
needs: [ build-jdk11 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Test with Maven
run: mvn test -ntp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-report
path: target/surefire-reports/
test-jdk17:
runs-on: ubuntu-latest
needs: [ build-jdk17 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Test with Maven
run: mvn test -ntp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-report
path: target/surefire-reports/
test-jdk21:
runs-on: ubuntu-latest
needs: [ build-jdk21 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Test with Maven
run: mvn test -ntp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-report
path: target/surefire-reports/

owasp:
runs-on: ubuntu-latest
timeout-minutes: 8
permissions:
actions: read
contents: read
security-events: write
needs: [ build-jdk11, build-jdk17, build-jdk21 ]
services:
owasp-db:
image: nalusolutionsgmbh/owasp-maven-action:latest
options: --entrypoint /bin/sh --name owasp-db --hostname owasp-db
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Copy owasp database from container to runner
run: docker cp $(docker ps -aqf "name=owasp-db"):/dependency-check/data ./dependency-checker-db/
- name: OWASP Check
run: |
mvn org.owasp:dependency-check-maven:aggregate \
-DdataDirectory=./dependency-checker-db \
-DfailBuildOnCVSS=7 \
-Dodc.outputDirectory=reports \
-Dformat=HTML \
-DautoUpdate=false \
-DsuppressionFiles=./owasp/owasp-suppressions.xml
- name: Upload OWASP results
if: always()
uses: actions/upload-artifact@master
with:
name: OWASP report
path: ${{github.workspace}}/**/reports/dependency-check-report.html
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,12 @@ public class PersonComponent implements IsElement<HTMLDivElement>, Editor<Person

```java
PersonComponent personComponent = new PersonComponent();

Person person = new Person(10, "Ahmad", false);

DomGlobal.document.body.appendChild(Card.create()
.appendChild(personComponent)
.asElement());

DomGlobal.document
.body
.appendChild(Card.create()
.appendChild(personComponent)
.asElement());
personComponent.edit(person);

```
8 changes: 4 additions & 4 deletions gwt-editor-gwt2-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
<description>Test cases for the GWT 2 tests</description>

<properties>
<maven.gwt.plugin>1.0.0</maven.gwt.plugin>
<maven.gwt.plugin>1.1.0</maven.gwt.plugin>

<gwt.version>2.9.0</gwt.version>
<gwt.version>2.12.2</gwt.version>
<junit.version>4.13.1</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>test</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public boolean equals(Object o) {
} else if (!(o instanceof ConstraintViolationImpl)) {
return false;
} else {
ConstraintViolationImpl<?> other = (ConstraintViolationImpl) o;
ConstraintViolationImpl<?> other = (ConstraintViolationImpl<?>) o;
return Objects.equals(this.message, other.message)
&& Objects.equals(this.propertyPath, other.propertyPath)
&& Objects.equals(this.rootBean, other.rootBean)
Expand Down
20 changes: 17 additions & 3 deletions gwt-editor-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<auto.common.version>1.1</auto.common.version>
<auto.service.version>1.0</auto.service.version>
Expand Down Expand Up @@ -179,7 +179,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<version>${maven.surfire.plugin}</version>
<executions>
<execution>
<id>unit-tests</id>
Expand All @@ -190,6 +190,7 @@
</execution>
</executions>
<configuration>
<argLine>${test.jvm.flags}</argLine>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
Expand Down Expand Up @@ -322,6 +323,19 @@
</plugins>
</build>
</profile>
<profile>
<id>add-exports</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<test.jvm.flags>
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
</test.jvm.flags>
</properties>
</profile>
</profiles>
</project>

Loading