Skip to content
Permalink
Browse files
Use github action for ci via ci.yml (#62)
  • Loading branch information
Linary committed Jun 18, 2021
1 parent 2c6982d commit 12e1a79dd431ec5bf457db452cdf7022b1466e72
Showing 2 changed files with 61 additions and 4 deletions.
@@ -0,0 +1,59 @@
name: hugegraph-computer ci

on:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- /^v[0-9]\..*$/
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- /^v[0-9]\..*$/

jobs:
computer-ci:
runs-on: ubuntu-16.04
steps:
- name: Install JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Checkout master
uses: actions/checkout@v2
with:
fetch-depth: 2
ref: master

- name: Compile
run: mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"

- name: Prepare env and service
env:
TRAVIS_DIR: computer-dist/src/assembly/travis
COMMIT_ID: c0dff5b233e853716ca6f3f28a5cda05e6f3d639
run: |
$TRAVIS_DIR/install-env.sh
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID | grep -v "Downloading\|Downloaded"
$TRAVIS_DIR/load-data-into-hugegraph.sh
- name: Unit test
run: mvn test -P unit-test

- name: Integrate test
run: mvn test -P integrate-test

- name: Collect codecov
run: bash <(curl -s https://codecov.io/bash)
@@ -3,12 +3,11 @@
set -ev

if [[ $# -ne 1 ]]; then
echo "Must pass base branch name of pull request"
echo "Must pass commit id of hugegraph repo"
exit 1
fi

CLIENT_BRANCH=$1
HUGEGRAPH_BRANCH=${CLIENT_BRANCH}
COMMIT_ID=$1
HUGEGRAPH_GIT_URL="https://github.com/hugegraph/hugegraph.git"

git clone --depth 100 ${HUGEGRAPH_GIT_URL}
@@ -21,7 +20,6 @@ rm -rf hugegraph
tar -zxf hugegraph-*.tar.gz

cd hugegraph-*
# start HugeGraphServer with http protocol
bin/init-store.sh || exit 1
bin/start-hugegraph.sh || exit 1
cd ../

0 comments on commit 12e1a79

Please sign in to comment.