diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 97a1f4827..db28fea02 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Build and Test Plugin +name: Build Plugin on: push: @@ -33,8 +33,10 @@ jobs: - macOS-latest - windows-latest java: + - 11 - 17 - name: Build and Test Plugin Template + - 20 + name: Build if: github.repository == 'opensearch-project/opensearch-ai-flow-framework' runs-on: ${{ matrix.os }} @@ -45,11 +47,6 @@ jobs: with: java-version: ${{ matrix.java }} distribution: temurin - - name: Build and Run Tests + - name: Build run: | - ./gradlew check - - name: Upload Coverage Report - if: matrix.os == 'ubuntu-latest' - uses: codecov/codecov-action@v3 - with: - file: ./build/reports/jacoco/test/jacocoTestReport.xml + ./gradlew build -x test -x integTest -x yamlRestTest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..6b228a9f7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Test Plugin + +on: + push: + branches-ignore: + - 'whitesource-remediate/**' + pull_request: + types: [opened, synchronize, reopened] + +jobs: + test: + strategy: + matrix: + test: + - test jacocoTestReport + - integTest + - yamlRestTest + os: + - ubuntu-latest + - macOS-latest + - windows-latest + java: + - 11 + - 17 + - 20 + if: github.repository == 'opensearch-project/opensearch-ai-flow-framework' + 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: Test + run: ./gradlew ${{ matrix.test }} + + - name: Upload Coverage Report + if: matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v3 + with: + file: ./build/reports/jacoco/test/jacocoTestReport.xml