From c84321f6f1b29dd7810f8e432784a5f36affe9f7 Mon Sep 17 00:00:00 2001 From: Daniel Widdis Date: Mon, 16 Oct 2023 10:57:02 -0700 Subject: [PATCH] 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 --- .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..ff6668af3 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, 20] + 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, 20] + 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