From d24299b8b94c96902bb12e4c7c00695268ba0da2 Mon Sep 17 00:00:00 2001 From: "James R. Perkins" Date: Thu, 1 Feb 2024 16:13:45 -0800 Subject: [PATCH] Allow the examples to be built from the example directory. Add CI for the examples. Signed-off-by: James R. Perkins --- .github/workflows/examples-ci.yml | 62 +++++++++++++++++++++++++++++++ examples/pom.xml | 21 +++++++---- 2 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/examples-ci.yml diff --git a/.github/workflows/examples-ci.yml b/.github/workflows/examples-ci.yml new file mode 100644 index 00000000..bb51eec3 --- /dev/null +++ b/.github/workflows/examples-ci.yml @@ -0,0 +1,62 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: WildFly JAR Maven Plugin Examples - CI + +on: + push: + branches: + - '**' + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +# Only run the latest job +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + build: + name: ${{ matrix.os }}-jdk${{ matrix.java }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest ] + java: ['11', '17', '21'] + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: 'maven' + - name: Build and Test Examples on ${{ matrix.java }} + # We first build the project, then we build the examples + run: | + mvn -B -ntp clean install -DskipTests + cd examples + mvn -B -ntp clean install + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: surefire-reports-${{ matrix.os }}-${{ matrix.java }} + path: | + !**/bootable-jar-build-artifacts/** + **/surefire-reports/ + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: server-logs-${{ matrix.os }}-${{ matrix.java }} + path: | + !**/bootable-jar-build-artifacts/** + **/server.log + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: logs-${{ matrix.os }}-${{ matrix.java }} + path: | + !**/bootable-jar-build-artifacts/** + **/tests/**/logs/** \ No newline at end of file diff --git a/examples/pom.xml b/examples/pom.xml index d52ffaa7..8e8f8b03 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -12,7 +12,7 @@ 11.0.0.Final-SNAPSHOT 18.0.2 - main + 31.0.0.Final 6.0.0.Final 1.0.1 true @@ -23,8 +23,8 @@ false - 5.0.0.Alpha5 - 1.6.0.Final + 5.0.1.Final + 1.7.0.Final 4.13.1 1.2.6 @@ -92,20 +92,25 @@ ejb-in-war ejb-persistent-clustered-timers elytron-oidc-client - gradle-mdb-rar + hollow-jar https jaxws jaxrs jib - jib-layers + jib-operator - jkube + jsf-ejb-jpa - keycloak + logging logging-json - mdb-rar + microprofile-config remote-microprofile-config postgresql