-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic github workflow for build and test
Signed-off-by: Sooraj Sinha <[email protected]>
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Test and Build Workflow | ||
# This workflow is triggered on pull requests to main branch | ||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
push: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
# Job name | ||
name: Build Replication plugin | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
- name: Set Up JDK 14 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 14 | ||
# dependencies: OpenSearch | ||
- name: Checkout OpenSearch | ||
uses: actions/checkout@v2 | ||
with: | ||
# TODO: Switch to OS 1.x branch | ||
repository: 'saikaranam-amazon/OpenSearch' | ||
path: OpenSearch | ||
ref: 'karanas-os-replication-all-changes' | ||
- name: Build OpenSearch | ||
working-directory: ./OpenSearch | ||
run: | | ||
./gradlew publishToMavenLocal -Dbuild.snapshot=true | ||
# dependencies: common-utils | ||
- name: Checkout common-utils | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'main' | ||
repository: 'opensearch-project/common-utils' | ||
path: common-utils | ||
- name: Build common-utils | ||
working-directory: ./common-utils | ||
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=true -Dopensearch.version=1.1.0-SNAPSHOT | ||
# This step uses the checkout Github action: https://github.com/actions/checkout | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
- name: Build and run Replication tests | ||
run: | | ||
./gradlew clean release -Dbuild.snapshot=true -Dopensearch.version=1.1.0-SNAPSHOT | ||
- name: Upload failed logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: logs | ||
path: | | ||
build/testclusters/integTest-*/logs/* | ||
build/testclusters/leaderCluster-*/logs/* | ||
build/testclusters/followCluster-*/logs/* | ||
- name: Create Artifact Path | ||
run: | | ||
mkdir -p cross-cluster-replication-artifacts | ||
cp ./build/distributions/*.zip cross-cluster-replication-artifacts | ||
- name: Uploads coverage | ||
uses: codecov/[email protected] |