From 19c89357fed002d55fd067cd522cb8e5b45792b7 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:30:50 -0700 Subject: [PATCH] [Backport 2.x] Run integ tests in parallel with build (#98) * Run integ tests in parallel with build (#94) * Run integ tests in parallel with build Signed-off-by: Daniel Widdis * Repo check on all runs, reduce JDK17 runs to ubuntu only Signed-off-by: Daniel Widdis --------- Signed-off-by: Daniel Widdis Co-authored-by: Joshua Palis (cherry picked from commit c84321f6f1b29dd7810f8e432784a5f36affe9f7) Signed-off-by: github-actions[bot] * Remove JDK20 from backport CI Signed-off-by: Daniel Widdis * Remove the other JDK20 Signed-off-by: Daniel Widdis --------- Signed-off-by: Daniel Widdis Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Joshua Palis Co-authored-by: Daniel Widdis --- .github/workflows/CI.yml | 43 +++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 97a1f4827..a26ad5cf9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Build and Test Plugin +name: CI on: push: @@ -28,16 +28,14 @@ jobs: needs: [spotless, javadoc] strategy: matrix: - os: - - ubuntu-latest - - macOS-latest - - windows-latest - java: - - 17 - name: Build and Test Plugin Template - if: github.repository == 'opensearch-project/opensearch-ai-flow-framework' + os: [ubuntu-latest, macos-latest, windows-latest] + java: [11] + include: + - os: ubuntu-latest + java: 17 + codecov: yes + name: Test JDK${{ matrix.java }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} - steps: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} @@ -47,9 +45,30 @@ jobs: distribution: temurin - name: Build and Run Tests run: | - ./gradlew check + ./gradlew check -x integTest -x yamlRestTest - name: Upload Coverage Report - if: matrix.os == 'ubuntu-latest' + if: ${{ matrix.codecov }} uses: codecov/codecov-action@v3 with: file: ./build/reports/jacoco/test/jacocoTestReport.xml + integTest: + needs: [spotless, javadoc] + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + java: [11] + include: + - os: ubuntu-latest + java: 17 + name: Integ Test JDK${{ matrix.java }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java }} + distribution: temurin + - name: Build and Run Tests + run: | + ./gradlew integTest yamlRestTest