Skip to content

Commit

Permalink
Merge pull request #488 from TcMenu/feature/ci-cd
Browse files Browse the repository at this point in the history
Initial CI/CD support
  • Loading branch information
davetcc authored Aug 26, 2024
2 parents a0670ba + 2479102 commit 65c3b6b
Show file tree
Hide file tree
Showing 25 changed files with 113 additions and 131 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build

on:
push:
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'liberica'
cache: maven

- name: Build embedCONTROLCore
run: mvn -B install -Dgpg.skip=true --file embedCONTROLCore/pom.xml

- name: Build tcMenuJavaApi
run: mvn -B install -Dgpg.skip=true --file tcMenuJavaApi/pom.xml

- name: Build tcMenuGenerator
run: mvn -B compile -Dgpg.skip=true --file tcMenuGenerator/pom.xml

- name: Build embeddedJavaExample
run: mvn -B package --file embeddedJavaExample/pom.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
builtPlugins
.idea/

# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar
Expand Down
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/sqldialects.xml

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## tcMenu - A menu library and designer for Arduino and mbed with IoT capabilities
[![Java Build](https://github.com/TcMenu/tcMenu/actions/workflows/build.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/build.yml)
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/TcMenu/tcMenu/blob/main/LICENSE)
[![GitHub release](https://img.shields.io/github/release/TcMenu/tcMenu.svg?maxAge=3600)](https://github.com/TcMenu/tcMenu/releases)
[![davetcc](https://img.shields.io/badge/davetcc-dev-blue.svg)](https://github.com/davetcc)
[![JSC TechMinds](https://img.shields.io/badge/JSC-TechMinds-green.svg)](https://www.jsctm.cz)

A menu library and designer UI for Arduino and mbed that is modular enough to support different input methods, display modules and IoT / remote control methods. TcMenu is more than just an Arduino menu library, think of it as a framework for building IoT applications that includes the ability to render menus locally onto a display.

Expand Down
41 changes: 16 additions & 25 deletions embedCONTROLCore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,12 @@
</scm>

<properties>
<jdk.version>21</jdk.version>
<jfx.version>21.0.2</jfx.version>
<jserialcomm.version>2.10.4</jserialcomm.version>
<google.gson.version>2.10</google.gson.version>
<springframework.version>6.0.11</springframework.version>
<junit5.surefire.version>1.3.2</junit5.surefire.version>
<junit5.version>5.10.2</junit5.version>
<mockito.version>5.10.0</mockito.version>
<hamcrest.version>2.2</hamcrest.version>
<jdk.version>22</jdk.version>
<jfx.version>22.0.2</jfx.version>
<jserialcomm.version>2.11.0</jserialcomm.version>
<google.gson.version>2.11.0</google.gson.version>
<junit5.version>5.11.0</junit5.version>
<mockito.version>5.12.0</mockito.version>
</properties>

<dependencies>
Expand All @@ -82,13 +79,13 @@
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.7.2</version>
<version>2.7.3</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.12</version>
<version>2.0.16</version>
</dependency>

<dependency>
Expand All @@ -104,12 +101,6 @@

<!-- END JavaFX notes -->

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit5.surefire.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand All @@ -125,7 +116,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.2</version>
<version>3.26.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -136,7 +127,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.13.0</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
Expand All @@ -145,12 +136,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -163,7 +154,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.8.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -176,7 +167,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -190,7 +181,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -201,7 +192,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.1.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
Expand Down
22 changes: 11 additions & 11 deletions embeddedJavaExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<version>0.0.1-SNAPSHOT</version>

<properties>
<jdk.version>20</jdk.version>
<jfx.version>21.0.2</jfx.version>
<jserialcomm.version>2.9.2</jserialcomm.version>
<jdk.version>22</jdk.version>
<jfx.version>22.0.2</jfx.version>
<jserialcomm.version>2.11.0</jserialcomm.version>
<tcmenu.api.version>4.3.0</tcmenu.api.version>
<timestamp>${maven.build.timestamp}</timestamp>
</properties>
Expand All @@ -33,7 +33,7 @@

<!--
!!!!!!!JavaFX - Special notes!!!!!!
If you are using BellSoft's Liberica Full JDK leave the below scopes set to "test"
If you are using BellSoft Liberica Full JDK leave the below scopes set to "test"
If you are using another JDK without JavaFX, comment out the scope for each org.openjfx component.
-->

Expand All @@ -53,19 +53,19 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>10.0.14</version>
<version>10.0.23</version>
</dependency>

<!-- To run javax.websocket in embedded server -->
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<version>10.0.14</version>
<version>10.0.23</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.36</version>
<version>2.0.16</version>
</dependency>

</dependencies>
Expand All @@ -92,7 +92,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.13.0</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
Expand All @@ -102,7 +102,7 @@
<!-- copy all the JARs for the dependencies into the jfx/deps folder -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<version>3.8.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand Down Expand Up @@ -137,7 +137,7 @@
<!-- copy the application JAR file from target dir into jfx/deps -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources-jar</id>
Expand All @@ -163,7 +163,7 @@
<plugin>
<!-- copy the data folder into the jfx/app folder -->
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources-logging</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void buildMenuInMenuComponents() {
MenuCommandProtocol protocol = context.getBean(MenuCommandProtocol.class);
ScheduledExecutorService executor = context.getBean(ScheduledExecutorService.class);
LocalIdentifier localId = new LocalIdentifier(menuManager.getServerUuid(), menuManager.getServerName());
var remMenuAvrBoardConnector = new SocketBasedConnector(localId, executor, Clock.systemUTC(), protocol, "192.168.0.96", 3333, ConnectMode.FULLY_AUTHENTICATED);
var remMenuAvrBoardConnector = new SocketBasedConnector(localId, executor, Clock.systemUTC(), protocol, "192.168.0.96", 3333, ConnectMode.FULLY_AUTHENTICATED, null);
var remMenuAvrBoard = new MenuInMenu(remMenuAvrBoardConnector, menuManager, menuManager.getManagedMenu().getMenuById(16).orElseThrow(), MenuInMenu.ReplicationMode.REPLICATE_ADD_STATUS_ITEM, 100000, 65000);
remMenuAvrBoard.start();
}
Expand Down
37 changes: 13 additions & 24 deletions tcMenuGenerator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

<!-- production deps -->
<jfx.version>21.0.2</jfx.version>
<jdk.version>22</jdk.version>
<jfx.version>22.0.2</jfx.version>
<jmetro.version>11.6.16</jmetro.version>
<google.gson.version>2.10</google.gson.version>
<picocli.version>4.7.5</picocli.version>
<springframework.version>6.0.11</springframework.version>
<google.gson.version>2.11.0</google.gson.version>
<picocli.version>4.7.6</picocli.version>

<!-- test deps -->
<junit5.surefire.version>1.3.2</junit5.surefire.version>
<junit5.version>5.10.2</junit5.version>
<mockito.version>5.10.0</mockito.version>
<hamcrest.version>2.2</hamcrest.version>
<junit5.version>5.11.0</junit5.version>
<mockito.version>5.12.0</mockito.version>
<testfx.version>4.0.18</testfx.version>
</properties>

Expand Down Expand Up @@ -62,7 +60,7 @@
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.7.2</version>
<version>2.7.3</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -116,12 +114,6 @@

<!-- test only dependencies start -->

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit5.surefire.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down Expand Up @@ -170,20 +162,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.13.0</version>
<configuration>
<source>22</source>
<target>22</target>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<excludes>com/thecoderscorner/menu/editorint/**</excludes>
</configuration>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -220,7 +209,7 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources-logging</id>
Expand Down Expand Up @@ -296,7 +285,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<version>3.7.1</version>
<executions>
<execution>
<phase>compile</phase> <!-- bind to the packaging phase -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,17 @@

package com.thecoderscorner.menu.editorint.uitests;

import com.thecoderscorner.menu.editorui.generator.core.CreatorProperty;
import com.thecoderscorner.menu.editorui.storage.ConfigurationStorage;
import com.thecoderscorner.menu.editorui.dialog.AboutDialog;
import com.thecoderscorner.menu.editorui.storage.ConfigurationStorage;
import javafx.application.Platform;
import javafx.scene.Node;
import javafx.scene.control.RadioButton;
import javafx.stage.Stage;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.testfx.api.FxAssert;
import org.testfx.api.FxRobot;
import org.testfx.framework.junit5.ApplicationExtension;
import org.testfx.framework.junit5.Start;
import org.testfx.matcher.control.TextInputControlMatchers;

import static com.thecoderscorner.menu.editorui.generator.parameters.FontDefinition.fromString;
import static com.thecoderscorner.menu.editorui.util.TestUtils.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.testfx.api.FxAssert.verifyThat;
Expand Down
Loading

0 comments on commit 65c3b6b

Please sign in to comment.