eclipse-ee4j / starter

Eclipse Starter for Jakarta EE
Eclipse Public License 2.0
49 stars 40 forks source link

Add all negative cases for None and WildFly runtimes #310

Open Tasnim1147 opened 2 weeks ago

eclipse-starter-bot commented 2 weeks ago

Can one of the admins verify this patch?

Tasnim1147 commented 2 weeks ago

Here is a summary of the changes I have made. I have added negative test cases for None and WildFly runtimes. There are two types of negative cases.

First type: The build should be successful, but the Dockerfile should not be generated. I have tested for the absence of the Dockerfile. For example:

 name: Run Archetype for EE 8, SE 8, with Docker
    run: |
      mvn archetype:generate -DinteractiveMode=false -DaskForDefaultPropertyValues=false -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakarta-starter -DarchetypeVersion=2.3.0-SNAPSHOT -DjakartaVersion=8 -Dprofile=full -DjavaVersion=8 -Ddocker=yes -DoutputDirectory=app -Dgoals="clean package"
      if [ -f app/jakartaee-hello-world/Dockerfile ]; then
        echo "Dockerfile found, test failed."
        exit 1
      fi
      rm -rf app

Second type: The build should fail. I have tested that the Maven build is not successful. For example:

- name: Run Archetype for EE 8 Core Profile, SE 8
    id: ee_8_core_se_8_none
    continue-on-error: true
    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"
- name: Check Maven Build Status
  run: |
    if [[ "${{ steps['ee_8_core_se_8_none'].outcome }}" != "failure" ]]; then
      echo "Maven build for EE 8 Core Profile, SE 8, without Docker succeeded, test failed."
      exit 1
    fi
m-reza-rahman commented 2 weeks ago

Thanks, I got it. Likely just a GitHub glitch. I'll try to review over the weekend.

Tasnim1147 commented 1 week ago

Kept Run Archetype for EE {8/9/9.1} Core Profile, SE 8 to ensure Core Profile only available for Jakarta EE 10 and later. Kept Run Archetype for EE 10, SE 8 to ensure Jakarta EE 10 requires Java SE above 8. and Java SE 8 requires Jakarta EE below 10. Kept Run Archetype for EE {9/9.1}, SE 8, WildFly to ensure WildFly requires Jakarta EE 8 or 10,

m-reza-rahman commented 1 week ago

OK. Will take a look when I am able.

m-reza-rahman commented 5 days ago

Can you resolve the merge conflicts please?

Tasnim1147 commented 5 days ago

I have resolved the conflicts.