-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add CI to dgraph4j repo (#191)
* add CI to dgraph4j repo
- Loading branch information
1 parent
0729433
commit d062550
Showing
9 changed files
with
262 additions
and
154 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,57 @@ | ||
name: ci-dgraph4j-tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 0 * * *" # run workflow daily | ||
jobs: | ||
build: | ||
name: dgraph4j-tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Dgraph repo # use latest dgraph build | ||
uses: actions/checkout@v3 | ||
with: | ||
path: dgraph | ||
repository: dgraph-io/dgraph | ||
ref: main | ||
- name: Checkout dgraph4j repo | ||
uses: actions/checkout@v3 | ||
with: | ||
path: dgraph4j | ||
repository: dgraph-io/dgraph4j | ||
ref: ${{ github.ref }} | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: microsoft | ||
java-version-file: dgraph4j/.java-version | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Get Go Version | ||
run: | | ||
#!/bin/bash | ||
cd dgraph | ||
GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) | ||
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GOVERSION }} | ||
- name: Build dgraph binary | ||
run: cd dgraph && make docker-image # builds docker image with local tag | ||
- name: Spin up local dgraph cluster | ||
run: cd dgraph4j && docker compose -f docker-compose.test.yml up -d | ||
- name: Run tests | ||
run: cd dgraph4j && ./gradlew build | ||
- name: Tear down cluster | ||
run: cd dgraph4j && docker compose -f docker-compose.test.yml down |
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 @@ | ||
11 |
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
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Wed Nov 01 15:13:53 IST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip |
Oops, something went wrong.