From 380c41c915538b93694015d0e53ff7220d148f3e Mon Sep 17 00:00:00 2001 From: Marek Kopecky Date: Thu, 5 Sep 2024 10:25:45 +0200 Subject: [PATCH] [WEJBHTTP-147] CI Add integration testing to CI script --- .github/workflows/integration.sh | 11 +++++++++ .github/workflows/integration.yml | 32 ++++++++++++++++++++++++++ .github/workflows/{ci.yml => unit.yml} | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/integration.sh create mode 100644 .github/workflows/integration.yml rename .github/workflows/{ci.yml => unit.yml} (97%) diff --git a/.github/workflows/integration.sh b/.github/workflows/integration.sh new file mode 100644 index 00000000..e16c1ada --- /dev/null +++ b/.github/workflows/integration.sh @@ -0,0 +1,11 @@ +echo "INTEGRATION TESTS" + +WILDFLY_HTTP_REPOSITORY=$1 +WILDFLY_HTTP_BRANCH=$2 + +git clone --depth=1 https://github.com/wildfly/ejb-client-testsuite + +cd ejb-client-testsuite + +mvn -B -ntp package -DspecificModule=prepare -Dhttp.client.repository=${WILDFLY_HTTP_REPOSITORY} -Dhttp.client.branch=${WILDFLY_HTTP_BRANCH} +mvn -B -ntp dependency:tree clean verify --fail-at-end -Dmaven.test.redirectTestOutputToFile=true diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..3b73c022 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,32 @@ +name: Wildfly EJB Client CI Integration Tests + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + build-test-matrix: + name: ${{ matrix.jdk-distribution}}-${{ matrix.jdk-version }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + jdk-distribution: [temurin] + jdk-version: [17] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.jdk-distribution }} ${{ matrix.jdk-version }} + uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.jdk-distribution }} + java-version: ${{ matrix.jdk-version }} + cache: 'maven' + - name: Run Tests + run: bash ${GITHUB_WORKSPACE}/.github/workflows/integration.sh ${{github.event.pull_request.head.repo.html_url}} ${{github.head_ref}} + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: surefire-${{ matrix.jdk-distribution }}-${{ matrix.jdk-version }}-${{ matrix.os }} + path: '**/surefire-reports/*.txt' diff --git a/.github/workflows/ci.yml b/.github/workflows/unit.yml similarity index 97% rename from .github/workflows/ci.yml rename to .github/workflows/unit.yml index ca7852b4..a9f051bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/unit.yml @@ -1,7 +1,7 @@ # 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 Http Client CI +name: WildFly Http Client CI Unit Tests on: pull_request: