Skip to content

Commit

Permalink
Allow the examples to be built from the example directory. Add CI for…
Browse files Browse the repository at this point in the history
… the examples.

Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Feb 2, 2024
1 parent 5023201 commit d24299b
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 8 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/examples-ci.yml
Original file line number Diff line number Diff line change
@@ -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/**
21 changes: 13 additions & 8 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<properties>
<version.bootable.jar>11.0.0.Final-SNAPSHOT</version.bootable.jar>
<version.keycloak>18.0.2</version.keycloak>
<version.wildfly>main</version.wildfly>
<version.wildfly>31.0.0.Final</version.wildfly>
<version.wildfly.datasources.galleon-pack>6.0.0.Final</version.wildfly.datasources.galleon-pack>
<version.jkube>1.0.1</version.jkube>
<plugin.fork.embedded>true</plugin.fork.embedded>
Expand All @@ -23,8 +23,8 @@
<failOnMissingWebXml>false</failOnMissingWebXml>
<!--<version.microprofile.bom>${version.wildfly}</version.microprofile.bom>
<version.server.bom>${version.wildfly}</version.server.bom>-->
<version.org.wildfly.arquillian>5.0.0.Alpha5</version.org.wildfly.arquillian>
<version.org.jboss.arquillian.junit>1.6.0.Final</version.org.jboss.arquillian.junit>
<version.org.wildfly.arquillian>5.0.1.Final</version.org.wildfly.arquillian>
<version.org.jboss.arquillian.junit>1.7.0.Final</version.org.jboss.arquillian.junit>
<version.junit>4.13.1</version.junit>
<version.org.jboss.shrinkwrap.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap.shrinkwrap>

Expand Down Expand Up @@ -92,20 +92,25 @@
<module>ejb-in-war</module>
<module>ejb-persistent-clustered-timers</module>
<module>elytron-oidc-client</module>
<module>gradle-mdb-rar</module>
<!-- This does not work with Maven
<module>gradle-mdb-rar</module> -->
<module>hollow-jar</module>
<module>https</module>
<module>jaxws</module>
<module>jaxrs</module>
<module>jib</module>
<module>jib-layers</module>
<!-- This example does not seem to be working. JIB seems to require the image hash which changes for each build.
<module>jib-layers</module> -->
<module>jib-operator</module>
<module>jkube</module>
<!-- This requires OpenShift and likely should not be part of the build by default.
<module>jkube</module> -->
<module>jsf-ejb-jpa</module>
<module>keycloak</module>
<!-- This does not work on WildFly 27+
<module>keycloak</module> -->
<module>logging</module>
<module>logging-json</module>
<module>mdb-rar</module>
<!-- This does not seem to work in a full build.
<module>mdb-rar</module> -->
<module>microprofile-config</module>
<module>remote-microprofile-config</module>
<module>postgresql</module>
Expand Down

0 comments on commit d24299b

Please sign in to comment.