Skip to content

Commit

Permalink
[issues-311] - Add a GitHub workflow to run the tests manually
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Nov 13, 2024
1 parent 97a0076 commit 4498582
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/wildfly-it-tests-manual-bootable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: WildFly Integration Tests (Bootable JAR) - Manual execution

on:
workflow_dispatch:
inputs:
wildfly-jar-maven-plugin-version:
description: 'The WildFly JAR Maven (Bootable JAR) plugin version that will be used when running the tests'
required: false
default: ""
type: string
build-wildFly:
description: 'Whether to build a custom WildFly snapshot to run the tests with'
required: true
default: false
type: boolean
wildFly-repo:
description: 'The WildFly repository that will be used to build the snapshot from'
required: false
default: "wildfly/wildfly"
type: string
wildFly-ref:
description: 'The WildFly branch that will be used to build the snapshot from'
required: false
default: "main"
type: string

jobs:
wildfly-it-tests-manual-bootable:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest'] # let's skip windows for now, ugly "file name too long error poppin' up currently": , 'windows-latest']
java-version: ['17', '21']
java-distribution: ['adopt']
steps:
- name: Checkout eap-microprofile-test-suite
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-distribution }} ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distribution }}
cache: 'maven'
- name: Checkout and build WildFly
uses: actions/checkout@v4
with:
repository: ${{ inputs.wildFly-repo }}
ref: ${{ inputs.wildFly-ref }}
path: 'local-wildfly'
if: ${{ inputs.build-wildFly == true }}
- name: Build WildFly
run: cd local-wildfly ; mvn clean install -DskipTests --batch-mode; cd ..
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the ENV VAR that stores the WildFly version
run: |
echo "MAVEN_ARGS_WILDFLY_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f local-wildfly/pom.xml)" >> "$GITHUB_ENV"
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the ENV VAR that stores the WildFly snapshot distribution version property
run: |
echo "MAVEN_ARGS_WILDFLY_DIST_VERSION=-Dversion.org.jboss.wildfly.dist=${{ env.MAVEN_ARGS_WILDFLY_VERSION }}" >> "$GITHUB_ENV"
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the ENV VAR that stores the WildFly snapshot distribution location property
run: |
echo "MAVEN_ARGS_WILDFLY_DIST_LOCATION=-Djboss.dist=${PWD}/local-wildfly/dist/target/wildfly-${{ env.MAVEN_ARGS_WILDFLY_VERSION }}" >> "$GITHUB_ENV"
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the WildFly JAR (Bootable JAR) Maven plugin version
run: |
echo "MAVEN_ARGS_WILDFLY_JAR_MAVEN_PLUGIN_VERSION=-Dversion.org.wildfly.jar.plugin=${{ inputs.wildfly-jar-maven-plugin-version }}" >> "$GITHUB_ENV"
if: ${{ ! inputs.wildfly-jar-maven-plugin-version == '' }}
- name: Build and run integration tests (${{ matrix.java-distribution }} ${{ matrix.java-version }}) against latest WildFly, on ${{ matrix.os }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mvn clean verify --batch-mode -fae ${{ env.MAVEN_ARGS_WILDFLY_DIST_LOCATION }} ${{ env.MAVEN_ARGS_WILDFLY_DIST_VERSION }} ${{ env.MAVEN_ARGS_WILDFLY_JAR_MAVEN_PLUGIN_VERSION }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-server-logs-jdk-${{ matrix.java-distribution }}-${{ matrix.java-version }}
path: |
**/target/surefire-reports/*
**/standalone/log/*
72 changes: 72 additions & 0 deletions .github/workflows/wildfly-it-tests-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: WildFly Integration Tests - Manual execution

on:
workflow_dispatch:
inputs:
build-wildFly:
description: 'Whether to build a custom WildFly snapshot to run the tests with'
required: true
default: false
type: boolean
wildFly-repo:
description: 'The WildFly repository that will be used to build the snapshot from'
required: false
default: "wildfly/wildfly"
type: string
wildFly-ref:
description: 'The WildFly branch that will be used to build the snapshot from'
required: false
default: "main"
type: string

jobs:
wildfly-it-tests-manual:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest'] # let's skip windows for now, ugly "file name too long error poppin' up currently": , 'windows-latest']
java-version: ['17', '21']
java-distribution: ['adopt']
steps:
- name: Checkout eap-microprofile-test-suite
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-distribution }} ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distribution }}
cache: 'maven'
- name: Checkout and build WildFly
uses: actions/checkout@v4
with:
repository: ${{ inputs.wildFly-repo }}
ref: ${{ inputs.wildFly-ref }}
path: 'local-wildfly'
if: ${{ inputs.build-wildFly == true }}
- name: Build WildFly
run: cd local-wildfly ; mvn clean install -DskipTests --batch-mode; cd ..
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the ENV VAR that stores the WildFly version
run: |
echo "MAVEN_ARGS_WILDFLY_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f local-wildfly/pom.xml)" >> "$GITHUB_ENV"
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the ENV VAR that stores the WildFly snapshot distribution version property
run: |
echo "MAVEN_ARGS_WILDFLY_DIST_VERSION=-Dversion.org.jboss.wildfly.dist=${{ env.MAVEN_ARGS_WILDFLY_VERSION }}" >> "$GITHUB_ENV"
if: ${{ inputs.build-wildFly == true }}
- name: Set the value for the ENV VAR that stores the WildFly snapshot distribution location property
run: |
echo "MAVEN_ARGS_WILDFLY_DIST_LOCATION=-Djboss.dist=${PWD}/local-wildfly/dist/target/wildfly-${{ env.MAVEN_ARGS_WILDFLY_VERSION }}" >> "$GITHUB_ENV"
if: ${{ inputs.build-wildFly == true }}
- name: Build and run integration tests (${{ matrix.java-distribution }} ${{ matrix.java-version }}) against latest WildFly, on ${{ matrix.os }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mvn clean verify --batch-mode -fae ${{ env.MAVEN_ARGS_WILDFLY_DIST_LOCATION }} ${{ env.MAVEN_ARGS_WILDFLY_DIST_VERSION }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-server-logs-jdk-${{ matrix.java-distribution }}-${{ matrix.java-version }}
path: |
**/target/surefire-reports/*
**/standalone/log/*

0 comments on commit 4498582

Please sign in to comment.