Skip to content

Commit 01ad037

Browse files
shai-almogshannah
andauthored
Use Maven install target for demo screenshot build (#4077)
* Fix demo screenshot build target * Trigger demo build when workflow changes * Update demo build to Codename One 7.0.208 * Enable demos test profile by default * fixed not running tests during build * Revert "fixed not running tests during build" This reverts commit 26c816e. --------- Co-authored-by: Steve Hannah <[email protected]>
1 parent 0bffbc8 commit 01ad037

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

.github/workflows/developer-guide-docs.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ jobs:
3131
filters: |
3232
demos:
3333
- 'docs/demos/**'
34+
- '.github/workflows/developer-guide-docs.yml'
3435
docs:
3536
- 'docs/developer-guide/**'
37+
- '.github/workflows/developer-guide-docs.yml'
38+
workflow:
39+
- '.github/workflows/developer-guide-docs.yml'
3640
3741
- name: Set up Java
3842
uses: actions/setup-java@v4
@@ -41,24 +45,24 @@ jobs:
4145
java-version: '11'
4246

4347
- name: Build Codename One demos
44-
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true'
48+
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true' || steps.changes.outputs.workflow == 'true'
4549
run: |
4650
set -euo pipefail
4751
mkdir -p "$HOME/.codenameone"
4852
touch "$HOME/.codenameone/guibuilder.jar"
4953
cp maven/CodeNameOneBuildClient.jar "$HOME/.codenameone/CodeNameOneBuildClient.jar"
50-
xvfb-run -a mvn -B -ntp -Dgenerate-gui-sources-done=true -pl common -am -f docs/demos/pom.xml test
54+
xvfb-run -a mvn -B -ntp -Dgenerate-gui-sources-done=true -pl common -am -f docs/demos/pom.xml install
5155
5256
- name: Install ImageMagick for screenshot comparison
53-
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true'
57+
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true' || steps.changes.outputs.workflow == 'true'
5458
run: |
5559
set -euo pipefail
5660
sudo apt-get update
5761
sudo apt-get install -y --no-install-recommends imagemagick
5862
5963
- name: Compare animation screenshots
6064
id: compare_animation_screenshots
61-
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true'
65+
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true' || steps.changes.outputs.workflow == 'true'
6266
continue-on-error: true
6367
run: |
6468
set -euo pipefail
@@ -168,7 +172,7 @@ jobs:
168172
fi
169173
170174
- name: Build Developer Guide HTML and PDF
171-
if: github.event_name != 'pull_request' || steps.changes.outputs.docs == 'true' || steps.changes.outputs.demos == 'true'
175+
if: github.event_name != 'pull_request' || steps.changes.outputs.docs == 'true' || steps.changes.outputs.demos == 'true' || steps.changes.outputs.workflow == 'true'
172176
run: |
173177
set -euo pipefail
174178
OUTPUT_ROOT="build/developer-guide"

docs/demos/common/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,14 @@
360360

361361
</plugin>
362362

363+
<plugin>
364+
<groupId>org.apache.maven.plugins</groupId>
365+
<artifactId>maven-surefire-plugin</artifactId>
366+
<configuration>
367+
<skipTests>true</skipTests>
368+
</configuration>
369+
</plugin>
370+
363371

364372
</plugins>
365373

docs/demos/javase/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,7 @@
299299
<!-- Profile for running Unit Tests -->
300300
<id>test</id>
301301
<activation>
302-
<property>
303-
<name>!skipTests</name>
304-
</property>
302+
<activeByDefault>true</activeByDefault>
305303
</activation>
306304
<properties>
307305
<codename1.platform>javase</codename1.platform>

docs/demos/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<module>common</module>
2020
</modules>
2121
<properties>
22-
<cn1.plugin.version>7.0.175</cn1.plugin.version>
23-
<cn1.version>LATEST</cn1.version>
22+
<cn1.plugin.version>7.0.208</cn1.plugin.version>
23+
<cn1.version>7.0.208</cn1.version>
2424
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2525
<java.version>1.8</java.version>
2626
<java-tests.version>11</java-tests.version>

0 commit comments

Comments
 (0)