-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
190 additions
and
24 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 |
---|---|---|
|
@@ -9,18 +9,12 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
build: | ||
pd: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
USE_STAGE: 'true' # Whether to include the stage repository. | ||
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | ||
REPORT_DIR: target/site/jacoco | ||
BACKEND: hstore | ||
TRIGGER_BRANCH_NAME: ${{ github.ref_name }} | ||
HEAD_BRANCH_NAME: ${{ github.head_ref }} | ||
BASE_BRANCH_NAME: ${{ github.base_ref }} | ||
TARGET_BRANCH_NAME: ${{ github.base_ref != '' && github.base_ref || github.ref_name }} | ||
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }} | ||
|
||
steps: | ||
- name: Install JDK 11 | ||
|
@@ -53,15 +47,146 @@ jobs: | |
- name: Prepare env and service | ||
run: | | ||
$TRAVIS_DIR/install-backend.sh $BACKEND | ||
$TRAVIS_DIR/start-pd.sh | ||
- name: Run pd test | ||
- name: Run client test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test | ||
- name: Run store test | ||
- name: Run core test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test | ||
- name: Run cli-tools test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-cli-tools-test | ||
- name: Run common test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test | ||
- name: Run service test | ||
run: | | ||
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-service-test | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: ${{ env.REPORT_DIR }}/*.xml | ||
|
||
store: | ||
# TODO: avoid duplicated env setup | ||
runs-on: ubuntu-20.04 | ||
env: | ||
USE_STAGE: 'true' # Whether to include the stage repository. | ||
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | ||
REPORT_DIR: target/site/jacoco | ||
|
||
steps: | ||
- name: Install JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'zulu' | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: use staged maven repo settings | ||
if: ${{ env.USE_STAGE == 'true' }} | ||
run: | | ||
cp $HOME/.m2/settings.xml /tmp/settings.xml | ||
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | ||
- name: Package | ||
run: | | ||
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp | ||
- name: Prepare env and service | ||
run: | | ||
$TRAVIS_DIR/start-pd.sh | ||
$TRAVIS_DIR/start-store.sh | ||
- name: Run client test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test | ||
- name: Run core test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test | ||
- name: Run common test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test | ||
- name: Run rocksdb test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test | ||
- name: Run server test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test | ||
- name: Run raftcore test | ||
run: | | ||
mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: ${{ env.REPORT_DIR }}/*.xml | ||
|
||
hstore: | ||
# TODO: avoid duplicated env setup | ||
runs-on: ubuntu-20.04 | ||
env: | ||
USE_STAGE: 'true' # Whether to include the stage repository. | ||
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | ||
REPORT_DIR: target/site/jacoco | ||
BACKEND: hstore | ||
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }} | ||
|
||
steps: | ||
- name: Install JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'zulu' | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: use staged maven repo settings | ||
if: ${{ env.USE_STAGE == 'true' }} | ||
run: | | ||
cp $HOME/.m2/settings.xml /tmp/settings.xml | ||
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | ||
- name: Package | ||
run: | | ||
mvn test -pl hg-store-test/hg-store-test -am -P store-client-test | ||
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp | ||
- name: Prepare env and service | ||
run: | | ||
$TRAVIS_DIR/install-backend.sh $BACKEND | ||
- name: Run unit test | ||
run: | | ||
|
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
26 changes: 26 additions & 0 deletions
26
hugegraph-server/hugegraph-dist/src/assembly/travis/start-pd.sh
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,26 @@ | ||
#!/bin/bash | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with this | ||
# work for additional information regarding copyright ownership. The ASF | ||
# licenses this file to You under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
set -ev | ||
|
||
HOME_DIR=$(pwd) | ||
PD_DIR=$HOME_DIR/hugegraph-pd/dist/hugegraph-pd-1.5.0.1 | ||
|
||
pushd $PD_DIR | ||
. bin/start-hugegraph-pd.sh | ||
sleep 10 | ||
popd |
26 changes: 26 additions & 0 deletions
26
hugegraph-server/hugegraph-dist/src/assembly/travis/start-store.sh
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,26 @@ | ||
#!/bin/bash | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with this | ||
# work for additional information regarding copyright ownership. The ASF | ||
# licenses this file to You under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
set -ev | ||
|
||
HOME_DIR=$(pwd) | ||
STORE_DIR=$HOME_DIR/hugegraph-store/dist/hugegraph-store-1.5.0.1 | ||
|
||
pushd $STORE_DIR | ||
. bin/start-hugegraph-store.sh | ||
sleep 5 | ||
popd |