-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ic77c4ee09f3375252b611c8f3e282a5be5499dcd
- Loading branch information
Showing
11 changed files
with
142 additions
and
22 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,61 @@ | ||
name: hugegraph ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- /^release-.*$/ | ||
- /^test-.*$/ | ||
pull_request: | ||
branches: | ||
- master | ||
- /^release-.*$/ | ||
- /^test-.*$/ | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-16.04 | ||
env: | ||
TRAVIS_DIR: hugegraph-dist/src/assembly/travis | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
BACKEND: [memory, cassandra, scylladb, mysql, hbase, rocksdb, postgresql] | ||
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 | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Compile | ||
run: | | ||
mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded" | ||
- name: Prepare env and service | ||
run: | | ||
$TRAVIS_DIR/install-backend.sh ${{ matrix.BACKEND }} | ||
- name: Run test | ||
run: | | ||
mvn test -P core-test,${{ matrix.BACKEND }} | ||
$TRAVIS_DIR/run-api-test.sh ${{ matrix.BACKEND }} | ||
$TRAVIS_DIR/run-unit-test.sh ${{ matrix.BACKEND }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
file: target/site/jacoco/jacoco.xml |
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
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
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
16 changes: 16 additions & 0 deletions
16
hugegraph-dist/src/assembly/travis/install-mysql-via-docker.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,16 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
TRAVIS_DIR=`dirname $0` | ||
|
||
# Need speed up it | ||
CONF=hugegraph-test/src/main/resources/hugegraph.properties | ||
MYSQL_USERNAME=root | ||
MYSQL_PASSWORD=123456 | ||
# Set MySQL configurations | ||
sed -i "s/jdbc.username=.*/jdbc.username=$MYSQL_USERNAME/" $CONF | ||
sed -i "s/jdbc.password=.*/jdbc.password=$MYSQL_PASSWORD/" $CONF | ||
|
||
docker pull mysql:5.7 | ||
docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7 |
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
23 changes: 23 additions & 0 deletions
23
hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.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,23 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
TRAVIS_DIR=`dirname $0` | ||
CONF=hugegraph-test/src/main/resources/hugegraph.properties | ||
|
||
POSTGRESQL_DRIVER=org.postgresql.Driver | ||
POSTGRESQL_URL=jdbc:postgresql://localhost:5432/ | ||
POSTGRESQL_USERNAME=postgres | ||
POSTGRESQL_PASSWORD=123456 | ||
|
||
# Set PostgreSQL configurations | ||
sed -i "s/jdbc.driver=.*/jdbc.driver=$POSTGRESQL_DRIVER/" $CONF | ||
sed -i "s?jdbc.url=.*?jdbc.url=$POSTGRESQL_URL?" $CONF | ||
sed -i "s/jdbc.username=.*/jdbc.username=$POSTGRESQL_USERNAME/" $CONF | ||
sed -i "s/jdbc.password=.*/jdbc.password=$POSTGRESQL_PASSWORD/" $CONF | ||
|
||
sudo service postgresql stop 9.2 | ||
|
||
docker pull postgres:9.6 | ||
docker volume create pgdata | ||
docker run --rm -v pgdata:/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_PASSWORD=123456 -d postgres:9.6 |
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
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
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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
set -ev | ||
|
||
BACKEND=$1 | ||
|
||
if [[ "$BACKEND" == "memory" ]]; then | ||
mvn test -P unit-test | ||
fi |
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