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