Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 24+ and add a nightly job to test against the latest ver… #639

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .github/workflows/nightly-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 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 Maven Plugin - Nightly CI

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '.github/workflows/nightly-ci.yml'
pull_request:
paths:
- '.github/workflows/nightly-ci.yml'

schedule:
- cron: '0 2 * * *' # Every day at 03:00 UTC

# 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:
nightly-build-test:
name: ${{ matrix.os }}-jdk${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest ]
java: ['17', '21']

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
cache: 'maven'
distribution: 'temurin'
- name: Build and Test on ${{ matrix.java }} - ${{ matrix.wildfly-version }}
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true'
- name: Upload surefire logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/'
- name: Upload failsafe logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: failsafe-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/failsafe-reports/'
- name: Upload logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.os }}-${{ matrix.java }}
path: '**/*.log'

nightly-latest-java:
name: nightly-jdk${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: ['23', '24-ea']

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
cache: 'maven'
distribution: 'temurin'
- name: Build and Test on ${{ matrix.java }} - ${{ matrix.wildfly-version }}
run: mvn clean install '-Dorg.jboss.logmanager.nocolor=true'
- name: Upload surefire logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-latest-${{ matrix.java }}
path: '**/surefire-reports/'
- name: Upload failsafe logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: failsafe-reports-latest-${{ matrix.java }}
path: '**/failsafe-reports/'
- name: Upload logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-latest-${{ matrix.java }}
path: '**/*.log'
16 changes: 16 additions & 0 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@
</build>

<profiles>
<profile>
<id>security-manager-required</id>
<activation>
<jdk>[24,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>org.wildfly.plugin.categories.SecurityManagerRequired</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>skip-channel-tests</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/

package org.wildfly.plugin.categories;

/**
* @author <a href="mailto:[email protected]">James R. Perkins</a>
*/
public interface SecurityManagerRequired {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.wildfly.plugin.categories.ChannelsRequired;
import org.wildfly.plugin.categories.SecurityManagerRequired;
import org.wildfly.plugin.tests.AbstractProvisionConfiguredMojoTestCase;
import org.wildfly.plugin.tests.AbstractWildFlyMojoTest;

Expand Down Expand Up @@ -53,7 +54,9 @@ public void testPackageWithChannel() throws Exception {
"org.wildfly.maven.plugin-package-goal-from-script");
}

// This test provisions WildFly 32 which does not boot on Java SE 24 without security manager support.
@Test
@Category(SecurityManagerRequired.class)
public void testPackageWithChannelGlow() throws Exception {

final Mojo packageMojo = lookupConfiguredMojo(
Expand Down
Loading