Skip to content

Commit

Permalink
Add basic github workflow for build and test (#123)
Browse files Browse the repository at this point in the history
Signed-off-by: Sooraj Sinha <[email protected]>

Co-authored-by: Ankit Kala <[email protected]>
  • Loading branch information
soosinha and ankitkala authored Sep 9, 2021
1 parent 5ba78e8 commit 5aec8b5
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
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]

0 comments on commit 5aec8b5

Please sign in to comment.