Skip to content

Commit

Permalink
more workflow changes to just test existing projects
Browse files Browse the repository at this point in the history
Signed-off-by: Arun Venmany <[email protected]>
  • Loading branch information
arunvenmany-ibm committed Jan 16, 2025
1 parent b03668f commit 55d998d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*,*compile-jsp-source-17-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
# Run tests
- name: Run tests
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*dev-it*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"

# WINDOWS BUILD
build-windows:
Expand Down
6 changes: 5 additions & 1 deletion liberty-maven-plugin/src/it/dev-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
<argLine>-enableassertions</argLine>
<workingDirectory>${project.build.directory}</workingDirectory>
<includes>
<include>**/*Test.java</include>
<include>**/*DevTest.java</include>
<include>**/*DevRecompileWithDefaultExecutionIdTest.java</include>
<include>**/*DevRecompileWithCustomExecutionIdTest.java</include>
<include>**/*DevHotTestingTest.java</include>
<include>**/*DevGenerateFeaturesDependenciesTest.java</include>
</includes>
<systemPropertyVariables>
<mavenPluginVersion>@pom.version@</mavenPluginVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>java-compile</id>
<phase>compile</phase>
<goals> <goal>compile</goal> </goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected static void setUpBeforeClass(String params, String projectRoot, boolea
}

protected static void startProcess(String params, boolean isDevMode) throws IOException, InterruptedException, FileNotFoundException {
startProcess(params, isDevMode, "mvn liberty:");
startProcess(params, isDevMode, "mvn compile liberty:");
}

protected static void startProcess(String params, boolean isDevMode, String mavenPluginCommand) throws IOException, InterruptedException, FileNotFoundException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public static void cleanUpAfterClass() throws Exception {
@Test
public void updateDependencyTest() throws Exception {
assertTrue(verifyLogMessageExists("Liberty is running in dev mode.", 10000));
assertTrue(getLogTail(), verifyLogMessageExists("Running maven-compiler-plugin:compile#java-compile", 10000));
assertTrue(getLogTail(), verifyLogMessageExists("Nothing to compile - all classes are up to date.", 10000));

File generatedFeaturesFile = getGeneratedFeaturesFile();
File targetGeneratedFeaturesFile = getTargetGeneratedFeaturesFile();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public static void cleanUpAfterClass() throws Exception {

@Test
public void autoTestsInvocationTest() throws Exception {
assertTrue(getLogTail(), verifyLogMessageExists("Running maven-compiler-plugin:compile#default-compile", 20000));
assertTrue(getLogTail(), verifyLogMessageExists("Nothing to compile - all classes are up to date.", 20000));
assertTrue(verifyLogMessageExists("Tests will run automatically", 20000));

testModifyJavaFile();
Expand Down

0 comments on commit 55d998d

Please sign in to comment.