Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separated out tests in a different GHA workflow #84

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test Plugin
name: Build Plugin

on:
push:
Expand Down Expand Up @@ -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 }}

Expand All @@ -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
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also just for understanding, what are yamlRestTests for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for testing the rest-api-spec yaml files. We don't have right now for our plugin, but we would in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os:
- ubuntu-latest
- macOS-latest
- windows-latest
java:
- 11
- 17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember in AD we had to test on 11, 17, 20. Should we do that here too? I think default for 2.x is jdk 11 still but could be wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbwiddis WDYT? Since you worked on the CI initially.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://opensearch.org/docs/latest/install-and-configure/install-opensearch/index/#java-compatibility this is what we have documented and i think java 20 is going to be for 3.x

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably match whatever OpenSearch tests.

- 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