Skip to content

Commit

Permalink
Merge pull request #5 from jamezp/testing-updates
Browse files Browse the repository at this point in the history
Add new tests and add CI integration testing
  • Loading branch information
jamezp authored Nov 19, 2024
2 parents 2f56ff6 + 35c827a commit 1c6f3a5
Show file tree
Hide file tree
Showing 7 changed files with 616 additions and 16 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: 'maven'
directory: '/'
schedule:
interval: 'daily'
- package-ecosystem: 'github-actions'
# Workflow files stored in the
# default location of `.github/workflows`
directory: '/'
schedule:
interval: 'daily'
102 changes: 102 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# 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 Launcher - CI

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '.github/workflows/ci.yml'
- '**/pom.xml'
- 'src/**'
pull_request:
paths:
- '.github/workflows/ci.yml'
- '**/pom.xml'
- 'src/**'
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

jobs:

build:
name: '${{ matrix.os }}-jdk${{ matrix.java }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' , 'windows-latest', 'macos-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.os }} - ${{ matrix.java }}
run: mvn clean install '-Dwildfly.feature.pack.version='
- 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'

build-jdk-11:
name: '${{ matrix.os }}-jdk11'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' , 'windows-latest', 'macos-latest' ]

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: 11
cache: 'maven'
distribution: 'temurin'
- name: Build and Test on ${{ matrix.os }} - 11
run: mvn -B clean install
- name: Upload surefire logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-11
path: '**/surefire-reports/'
- name: Upload failsafe logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: failsafe-reports-${{ matrix.os }}-11
path: '**/failsafe-reports/'
- name: Upload logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.os }}-11
path: '**/*.log'
136 changes: 136 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# 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 Luancher Integration Tests

on:
push:
branches:
- '**'
paths:
- '.github/workflows/integration-tests.yml'
- '**/pom.xml'
- 'src/main/**'
- '!src/test/**'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/integration-tests.yml'
- '**/pom.xml'
- 'src/**'
- '!src/test/**'
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

jobs:

arquillian-test:
name: WildFly Arquillian Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
path: wildfly-launcher
- name: Set up JDKs
uses: actions/setup-java@v4
with:
java-version: |
11
17
21
distribution: 'temurin'
architecture: x64
cache: 'maven'

- name: Install SNAPSHOT
run: |
cd wildfly-launcher
mvn -B -ntp install -DskipTests
- name: Check out WildFly Arquillian
uses: actions/checkout@v4
with:
repository: wildfly/wildfly-arquillian
path: wildfly-arquillian
- name: Test WildFly Arquillian
run: |
cd wildfly-arquillian
mvn versions:use-latest-snapshots -DallowSnapshots -Dincludes=org.wildfly.launcher:wildfly-launcher versions:update-properties
git diff
mvn -B -ntp install -Djava11.home=${{env.JAVA_HOME_11_X64}} -Djava17.home=${{env.JAVA_HOME_17_X64}}
maven-plugin-test:
name: WildFly Maven Plugin Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
path: wildfly-launcher
- name: Set up JDKs
uses: actions/setup-java@v4
with:
java-version: |
11
17
21
distribution: 'temurin'
architecture: x64
cache: 'maven'

- name: Install SNAPSHOT
run: |
cd wildfly-launcher
mvn -B -ntp install -DskipTests
- name: Check out WildFly Maven Plugin
uses: actions/checkout@v4
with:
repository: wildfly/wildfly-maven-plugin
path: wildfly-maven-plugin
- name: Test the WildFly Maven Plugin
run: |
cd wildfly-maven-plugin
mvn versions:use-latest-snapshots -DallowSnapshots -Dincludes=org.wildfly.launcher:wildfly-launcher versions:update-properties
git diff
mvn -B -ntp install -Djava11.home=${{env.JAVA_HOME_11_X64}} -Djava17.home=${{env.JAVA_HOME_17_X64}}
wildfly-plugin-tools-test:
name: WildFly Plugin Tools Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
path: wildfly-launcher
- name: Set up JDKs
uses: actions/setup-java@v4
with:
java-version: |
11
17
21
distribution: 'temurin'
architecture: x64
cache: 'maven'

- name: Install SNAPSHOT
run: |
cd wildfly-launcher
mvn -B -ntp install -DskipTests
- name: Check out WildFly Plugin Tools
uses: actions/checkout@v4
with:
repository: wildfly/wildfly-plugin-tools
path: wildfly-plugin-tools
- name: Test the WildFly Plugin Tools
run: |
cd wildfly-plugin-tools
mvn versions:use-latest-snapshots -DallowSnapshots -Dincludes=org.wildfly.launcher:wildfly-launcher versions:update-properties
git diff
mvn -B -ntp install -Djava11.home=${{env.JAVA_HOME_11_X64}} -Djava17.home=${{env.JAVA_HOME_17_X64}}
102 changes: 102 additions & 0 deletions .github/workflows/wildfly-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# 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 Launcher Integration - CI

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/wildfly-ci.yml'
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

jobs:

wildfly-test-and-build:
name: '${{ matrix.os }}-jdk${{ matrix.java }}'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' , 'windows-latest' ]
java: ['17', '21', '24-ea']

steps:
- uses: actions/checkout@v4
- uses: wildfly-extras/wildfly-nightly-download@v1
id: wildfly-nightly
- 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.os }} - ${{ matrix.java }} with WildFly ${{steps.wildfly-nightly.outputs.wildfly-version}}
run: mvn clean install '-Dwildfly.feature.pack.version=${{steps.wildfly-nightly.outputs.wildfly-version}}'
- 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'

legacy-test-and-build:
name: 'legacy-${{ 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 }}
cache: 'maven'
distribution: 'temurin'
- name: Build and Test on ${{ matrix.os }} - ${{ matrix.java }} with WildFly 32.0.0.Final
# 32.0.0.Final was the first version which deployed channels
run: mvn clean install '-Dwildfly.feature.pack.version=32.0.0.Final'
- name: Upload surefire logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: legacy-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: legacy-failsafe-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/failsafe-reports/'
- name: Upload logs for failed run
uses: actions/upload-artifact@v4
if: failure()
with:
name: legacy-server-logs-${{ matrix.os }}-${{ matrix.java }}
path: '**/*.log'
Loading

0 comments on commit 1c6f3a5

Please sign in to comment.