From 3388767b92c046fbce7c9868c10ed4a864ccc67f Mon Sep 17 00:00:00 2001 From: Tomasz Adamski Date: Fri, 7 Jul 2023 15:30:00 +0200 Subject: [PATCH 1/2] [EJBCLIENT-505] CI Add integration testing to CI script --- .github/workflows/integration.sh | 11 ++++++++++ .github/workflows/integration.yml | 30 ++++++++++++++++++++++++++ .github/workflows/{ci.yml => unit.yml} | 2 +- 3 files changed, 42 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 000000000..1927d2fd9 --- /dev/null +++ b/.github/workflows/integration.sh @@ -0,0 +1,11 @@ +echo "INTEGRATION TESTS" + +EJB_CLIENT_REPOSITORY=$1 +EJB_CLIENT_BRANCH=$2 + +git clone --depth=1 https://github.com/wildfly/ejb-client-testsuite + +cd ejb-client-testsuite + +mvn -B -ntp package -DspecificModule=prepare --batch-mode -Dejb.client.repository=https://github.com/${EJB_CLIENT_REPOSITORY} -Dejb.client.branch=${EJB_CLIENT_BRANCH} +mvn -B -ntp dependency:tree clean verify --fail-at-end --batch-mode \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 000000000..ce2bd2d98 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,30 @@ +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 }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + jdk-distribution: [temurin] + jdk-version: [17] + steps: + - uses: actions/checkout@v3 + - name: Set up JDK ${{ matrix.jdk-distribution }} ${{ matrix.jdk-version }} + uses: actions/setup-java@v3 + with: + distribution: ${{ matrix.jdk-distribution }} + java-version: ${{ matrix.jdk-version }} + - name: Run Tests + run: bash ${GITHUB_WORKSPACE}/.github/workflows/integration.sh ${{github.repository}} ${{github.head_ref}} + - uses: actions/upload-artifact@v3 + 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 7ededc6d6..5689200ca 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 EJB Client CI +name: Wildfly EJB Client CI Unit Tests on: pull_request: From 12be399ded6427f3fa00c8b3ce3c3d4587cb476a Mon Sep 17 00:00:00 2001 From: Tomasz Adamski Date: Fri, 21 Jul 2023 21:22:08 +0200 Subject: [PATCH 2/2] [EJBCLIENT-505] Fix repo name --- .github/workflows/integration.sh | 2 +- .github/workflows/integration.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.sh b/.github/workflows/integration.sh index 1927d2fd9..d351dba07 100644 --- a/.github/workflows/integration.sh +++ b/.github/workflows/integration.sh @@ -7,5 +7,5 @@ git clone --depth=1 https://github.com/wildfly/ejb-client-testsuite cd ejb-client-testsuite -mvn -B -ntp package -DspecificModule=prepare --batch-mode -Dejb.client.repository=https://github.com/${EJB_CLIENT_REPOSITORY} -Dejb.client.branch=${EJB_CLIENT_BRANCH} +mvn -B -ntp package -DspecificModule=prepare --batch-mode -Dejb.client.repository=${EJB_CLIENT_REPOSITORY} -Dejb.client.branch=${EJB_CLIENT_BRANCH} mvn -B -ntp dependency:tree clean verify --fail-at-end --batch-mode \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ce2bd2d98..c0454bdd2 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -22,7 +22,7 @@ jobs: distribution: ${{ matrix.jdk-distribution }} java-version: ${{ matrix.jdk-version }} - name: Run Tests - run: bash ${GITHUB_WORKSPACE}/.github/workflows/integration.sh ${{github.repository}} ${{github.head_ref}} + run: bash ${GITHUB_WORKSPACE}/.github/workflows/integration.sh ${{github.event.pull_request.head.repo.html_url}} ${{github.head_ref}} - uses: actions/upload-artifact@v3 if: failure() with: