Skip to content

Commit

Permalink
Merge pull request #318 from Tasnim1147/master
Browse files Browse the repository at this point in the history
Add negative cases for None and WildFly runtimes
  • Loading branch information
Reza Rahman authored Jul 21, 2024
2 parents 2c2a4b4 + 17e3705 commit 156c834
Showing 1 changed file with 141 additions and 5 deletions.
146 changes: 141 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ jobs:
- name: Build Archetype
run: mvn clean install --file archetype/pom.xml

- name: Run Archetype for EE 8, SE 7
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=7 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="valid Java SE versions are 8, 11, and 17"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 8, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package"
Expand All @@ -36,6 +49,19 @@ jobs:
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package"
rm -rf app
- name: Run Archetype for EE 8 Core Profile, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=core -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="Core Profile is only supported for Jakarta EE 10"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 9, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9 -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package"
Expand All @@ -46,6 +72,19 @@ jobs:
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=web -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package"
rm -rf app
- name: Run Archetype for EE 9 Core Profile, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=core -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="Core Profile is only supported for Jakarta EE 10"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi

rm -f mvn_output.txt

- name: Run Archetype for EE 9.1, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9.1 -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package"
Expand All @@ -56,6 +95,32 @@ jobs:
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=web -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package"
rm -rf app
- name: Run Archetype for EE 9.1 Core Profile, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=core -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="Core Profile is only supported for Jakarta EE 10"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi

rm -f mvn_output.txt

- name: Run Archetype for EE 10, SE 8
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=full -DjavaVersion=8 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="Jakarta EE 10 does not support Java SE 8"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 8, SE 8, GlassFish
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=8 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
Expand Down Expand Up @@ -186,6 +251,19 @@ jobs:
docker rmi test-image
rm -rf app/wildfly
- name: Run Archetype for EE 8, SE 8, WildFly, with Invalid Docker
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=8 -Druntime=wildfly -Ddocker=Y -DoutputDirectory=app/wildfly -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="valid Docker options are yes and no"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 8 Web Profile, SE 8, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=web -DjavaVersion=8 -Druntime=wildfly -DoutputDirectory=app/wildfly -Dgoals="clean package"
Expand All @@ -198,6 +276,43 @@ jobs:
docker rmi test-image
rm -rf app/wildfly
- name: Run Archetype for EE 9, SE 8, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9 -Dprofile=full -DjavaVersion=8 -Druntime=wildfly -DoutputDirectory=app/wildfly -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="WildFly does not offer a release for Jakarta EE 9 or Jakarta EE 9.1"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 9.1, SE 8, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=9.1 -Dprofile=full -DjavaVersion=8 -Druntime=wildfly -DoutputDirectory=app/wildfly -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="WildFly does not offer a release for Jakarta EE 9 or Jakarta EE 9.1"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 8, SE 8, WebLogic
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=8 -Druntime=weblogic -DoutputDirectory=app/weblogic -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="valid runtime values are none, glassfish, open-liberty, payara, tomee, and wildfly"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
- name: Set up Java SE 11
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -249,6 +364,32 @@ jobs:
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=core -DjavaVersion=11 -DoutputDirectory=app -Dgoals="clean package"
rm -rf app
- name: Run Archetype for EE 10 Micro Profile, SE 11
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=micro -DjavaVersion=11 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="valid Jakarta EE profiles are core, web, and full"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 11, SE 11
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=11 -DjavaVersion=11 -DoutputDirectory=app -Dgoals="clean package" | tee mvn_output.txt
MAVEN_EXIT_CODE=${PIPESTATUS[0]}
ERROR_MESSAGE="valid Jakarta EE versions are 8, 9, 9.1, and 10"
if ! { [ $MAVEN_EXIT_CODE -ne 0 ] && grep -q "$ERROR_MESSAGE" mvn_output.txt; }; then
echo "Maven build did not fail, or the expected error message was not found. Test Failed."
exit 1
fi
rm -f mvn_output.txt
- name: Run Archetype for EE 8, SE 11, GlassFish
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=11 -Druntime=glassfish -DoutputDirectory=app/glassfish -Dgoals="clean package"
Expand Down Expand Up @@ -920,11 +1061,6 @@ jobs:
docker rmi test-image
rm -rf app/tomee
- name: Run Archetype for EE 10 Web Profile, SE 17, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=10 -Dprofile=web -DjavaVersion=17 -Druntime=wildfly -Ddocker=yes -DoutputDirectory=app/wildfly -Dgoals="clean package"
rm -rf app/wildfly
- name: Run Archetype for EE 8, SE 17, WildFly
run: |
mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -DjavaVersion=17 -Druntime=wildfly -DoutputDirectory=app/wildfly -Dgoals="clean package"
Expand Down

0 comments on commit 156c834

Please sign in to comment.