Make the CI more modular to allow for testing also against CXF and also #15
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: | ||
pull_request: | ||
paths-ignore: | ||
- '.github/project.yml' | ||
env: | ||
QUARKUS_CXF_MTOM_LARGE_ATTACHMENT_INCREMENT_KB: 512 | ||
JAVA_VERSION: 17 | ||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
jobs: | ||
build-and-test: | ||
if: startsWith(github.head_ref, 'trigger-release-') == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Set up JDK ${{ inputs.java-version }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: ${{ inputs.java-version }} | ||
- name: Detect CXF maintenance branch | ||
id: cxf-branch-info | ||
uses: ./.github/actions/maintenance-branch-info | ||
with: | ||
dependency-short-name: cxf | ||
- name: Build CXF if needed | ||
if: steps.cxf-branch-info.outputs.is-maintenance-branch == 'true' | ||
uses: ./.github/actions/rebuild-dependency | ||
id: rebuild-cxf | ||
with: | ||
dependency-git-repo-url: https://github.com/apache/cxf.git | ||
dependency-short-name: cxf | ||
dependency-branch: '${{ steps.cxf-branch-info.outputs.dependency-stream == 'main' && steps.cxf-branch-info.outputs.dependency-stream || format('{0}.x-fixes', steps.cxf-branch-info.outputs.dependency-stream) }}' | ||
- name: Detect Quarkus maintenance branch | ||
id: quarkus-branch-info | ||
uses: ./.github/actions/maintenance-branch-info | ||
with: | ||
dependency-short-name: quarkus | ||
- name: Build Quarkus if needed | ||
if: steps.quarkus-branch-info.outputs.is-maintenance-branch == 'true' | ||
uses: ./.github/actions/rebuild-dependency | ||
id: rebuild-quarkus | ||
with: | ||
dependency-git-repo-url: https://github.com/quarkusio/quarkus.git | ||
dependency-short-name: quarkus | ||
dependency-branch: '${{ steps.quarkus-branch-info.outputs.dependency-stream }}' | ||
- name: build-and-test | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
run-native-tests: false | ||
upload-antora-site: true | ||
native-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
testModule: ['async-vertx-client', 'client', 'client-server', 'fastinfoset', 'hc5', 'metrics', 'mtls', 'mtls -Djks', 'mtom', 'mtom-awt', 'opentelemetry', 'saaj', 'santuario-xmlsec', 'server', 'ws-rm-client', 'ws-security', 'ws-security -Djks', 'ws-security-policy', 'ws-security-policy -Djks', 'ws-trust', 'wsdl2java', 'wsdl2java-no-config'] | ||
name: ${{matrix.testModule}} native tests | ||
needs: build-and-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: run-native-test | ||
uses: ./.github/actions/run-native-test | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
test-module-spec: ${{matrix.testModule}} | ||
windows-tests: | ||
name: Windows tests | ||
needs: build-and-test | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK ${{ env.JAVA_VERSION }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: Download Maven Repo | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: maven-repo | ||
path: .. | ||
- name: Extract Maven Repo | ||
shell: bash | ||
run: | | ||
tar -xzf ../maven-repo.tgz -C ~ | ||
- name: mvn test | ||
shell: bash | ||
run: | | ||
./mvnw -B test \ | ||
-Dskip-testcontainers-tests \ | ||
-Dformat.skip \ | ||
-Denforcer.skip \ | ||
-pl '!:quarkus-cxf-docs,!:quarkus-cxf-test-ws-rm-server-native' \ | ||
-ntp \ | ||
-fae | ||
# Same as the previous but different default ConduitFactory | ||
- name: QUARKUS_CXF_DEFAULT_HTTP_CONDUIT_FACTORY=URLConnectionHTTPConduitFactory mvn test | ||
env: | ||
QUARKUS_CXF_DEFAULT_HTTP_CONDUIT_FACTORY: URLConnectionHTTPConduitFactory | ||
shell: bash | ||
run: | | ||
./mvnw -B clean test \ | ||
-Dskip-testcontainers-tests \ | ||
-Dformat.skip \ | ||
-Denforcer.skip \ | ||
-pl '!:quarkus-cxf-docs,!:quarkus-cxf-test-ws-rm-server-native' \ | ||
-ntp \ | ||
-fae |