Release 3.1.1 #687
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
- "3.0.x" | |
- "2.x" | |
paths-ignore: | |
- '.gitignore' | |
- 'CODEOWNERS' | |
- 'LICENSE' | |
- '*.md' | |
- '*.adoc' | |
- '*.txt' | |
- '.all-contributorsrc' | |
pull_request: | |
paths-ignore: | |
- '.gitignore' | |
- 'CODEOWNERS' | |
- 'LICENSE' | |
- '*.md' | |
- '*.adoc' | |
- '*.txt' | |
- '.all-contributorsrc' | |
permissions: | |
actions: write | |
checks: write | |
pull-requests: write | |
jobs: | |
recreate-comment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish Report | |
uses: turing85/[email protected] | |
with: | |
checkout: 'true' | |
recreate-comment: true | |
generate-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.generate-matrix.outputs.matrix }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Generate Matrix | |
id: generate-matrix | |
run: | | |
root=$(pwd)/integration-tests | |
pom_file=pom.xml | |
exclude_dir_pattern=common | |
exclude_package_type=pom | |
mapfile -t candidates < <( | |
find "${root}" -type f -name "${pom_file}" \ | |
| sed "s|/${pom_file}$||" \ | |
| sort \ | |
| uniq) | |
results=() | |
for candidate in "${candidates[@]}" | |
do | |
if [[ "${candidate}" = "${root}" || "${candidate}" =~ ${exclude_dir_pattern} ]] | |
then | |
continue | |
fi | |
pom_packaging=0 | |
grep --quiet \ | |
"<packaging>${exclude_package_type}</packaging>" \ | |
"${candidate}/${pom_file}" \ | |
|| pom_packaging="${?}" | |
if [[ "${pom_packaging}" -ne 0 ]] | |
then | |
results+=("${candidate}") | |
fi | |
done | |
matrix=$( \ | |
echo "${results[@]}" \ | |
| tr " " "\n" \ | |
| sed "s|$(pwd)/||" \ | |
| jq \ | |
--raw-input \ | |
--null-input \ | |
--compact-output \ | |
"[ [inputs][] | { \"integration-test-module\": . } ] | { \"include\": . }") | |
echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}" | |
- name: Cancel Build | |
if: ${{ failure() }} | |
uses: andymckay/[email protected] | |
populate-cache: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
id: setup | |
- name: Populate Maven Cache | |
id: populate | |
if: ${{ steps.setup.outputs.cache-hit != 'true' }} | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
quarkus:go-offline \ | |
de.qaware.maven:go-offline-maven-plugin:resolve-dependencies | |
- name: Cancel Build | |
if: ${{ failure() }} | |
uses: andymckay/[email protected] | |
build-and-test-jvm: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
needs: | |
- generate-matrix | |
- populate-cache | |
strategy: | |
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Build and Test | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--also-make \ | |
--define no-format \ | |
--projects \ | |
"core/deployment, \ | |
jms/deployment, \ | |
${{ matrix.integration-test-module }}" \ | |
verify | |
- name: Upload JVM Test Report | |
uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: test-report-jvm | |
path: '**/target/*-reports/TEST*.xml' | |
if-no-files-found: error | |
retention-days: 2 | |
test-report-jvm: | |
runs-on: ubuntu-latest | |
needs: | |
- recreate-comment | |
- build-and-test-jvm | |
steps: | |
- name: Publish Report | |
uses: turing85/[email protected] | |
with: | |
checkout: 'true' | |
download-artifact-name: test-report-jvm | |
report-name: JUnit JVM Test | |
report-path: '**/target/surefire-reports/TEST*.xml' | |
build-and-test-native: | |
runs-on: ubuntu-latest | |
needs: | |
- populate-cache | |
- generate-matrix | |
continue-on-error: true | |
strategy: | |
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Get Maven Cache | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Set up GraalVM 17 | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
version: 'latest' | |
java-version: 17 | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Test | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--also-make \ | |
--define native \ | |
--define native.surefire.skip \ | |
--projects \ | |
"core/deployment, \ | |
jms/deployment, \ | |
${{ matrix.integration-test-module }}" \ | |
verify | |
- name: Upload Native Test Report | |
uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: test-report-native | |
path: '**/target/*-reports/TEST*.xml' | |
if-no-files-found: error | |
retention-days: 2 | |
test-report-native: | |
runs-on: ubuntu-latest | |
needs: | |
- recreate-comment | |
- build-and-test-native | |
steps: | |
- name: Publish Report | |
if: ${{ always() }} | |
uses: turing85/[email protected] | |
with: | |
checkout: 'true' | |
download-artifact-name: test-report-native | |
report-name: JUnit Native Test | |
report-path: '**/target/*-reports/TEST*.xml' |