Skip to content

Update CI to run tests on different versions within the same containe… #1013

Update CI to run tests on different versions within the same containe…

Update CI to run tests on different versions within the same containe… #1013

Workflow file for this run

# 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 Plugin Tools - CI
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
schedule:
- cron: '0 0 * * *' # Every day at 00: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
env:
MVN_CMD: './mvnw -V -B'
jobs:
format-check:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Validate Formatting
run: |
${{ env.MVN_CMD }} validate -Pformat-check -Denforcer.skip=true
build:
name: '${{ matrix.os }}'
needs: format-check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' , 'windows-latest', 'macos-latest' ]
steps:
- uses: actions/checkout@v6
- name: Set up JDKs
uses: actions/setup-java@v5
with:
cache: 'maven'
distribution: 'temurin'
# Please note the order here of having 25 last as that is the version we want to compile with
java-version: |
17
21
26
25
- name: Build and Test on ${{ matrix.os }} - Java 25
run: ${{ env.MVN_CMD }} clean verify
- name: Build and Test on ${{ matrix.os }} - Java 26
run: ${{ env.MVN_CMD }} verify '-Dtest.java.home=${{env.JAVA_HOME_26_X64}}${{env.JAVA_HOME_26_ARM64}}' '-Dtest.report.dir=java26'
- name: Build and Test on ${{ matrix.os }} - Java 21
run: ${{ env.MVN_CMD }} verify '-Dtest.java.home=${{env.JAVA_HOME_21_X64}}${{env.JAVA_HOME_21_ARM64}}' '-Dtest.report.dir=java21'
- name: Build and Test on ${{ matrix.os }} - Java 17
run: ${{ env.MVN_CMD }} verify '-Dtest.java.home=${{env.JAVA_HOME_17_X64}}${{env.JAVA_HOME_17_ARM64}}' '-Dtest.report.dir=java17'
- name: Upload test logs for failed run
uses: actions/upload-artifact@v7
if: failure()
with:
name: test-reports-${{ matrix.os }}
path: |
**/logs/
**/*.log
**/failsafe-reports/
**/surefire-reports/