Skip to content
Permalink
Browse files
refact: adopt all modules run actions well in toolchain & enhance the…
… ci logic (#268)
  • Loading branch information
imbajin committed May 9, 2022
1 parent 3f7b35f commit 296d13ab19772b27e7238adc494b17ca17685cde
Showing 29 changed files with 476 additions and 796 deletions.
@@ -1,3 +1,4 @@
# due to the permission with apache action, stop use cla action now
name: "CLA Assistant"
on:
issue_comment:

This file was deleted.

@@ -1,22 +1,28 @@
name: hugegraph-client ci
name: hugegraph-client-ci

on:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
paths:
- hugegraph-client/**
- pom.xml
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
paths:
- hugegraph-client/**
- pom.xml

jobs:
build:
runs-on: ubuntu-20.04
env:
TRAVIS_DIR: assembly/travis
TRAVIS_DIR: hugegraph-client/assembly/travis
COMMIT_ID: 1d031c5905cbef008dd5fb468576b0e6a9445181
strategy:
fail-fast: false
@@ -43,19 +49,21 @@ jobs:

- name: Compile
run: |
mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
cd hugegraph-client && ls *
mvn -e compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
- name: Prepare env and service
run: |
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
- name: Run test
run: |
cd hugegraph-client && ls *
mvn test -Dtest=UnitTestSuite
mvn test -Dtest=ApiTestSuite
mvn test -Dtest=FuncTestSuite
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3.0.0
with:
file: target/jacoco.xml
@@ -1,4 +1,4 @@
name: hugegraph-hubble ci
name: hugegraph-hubble-ci

on:
push:
@@ -7,15 +7,21 @@ on:
- /^release-.*$/
- /^test-.*$/
- /^v[0-9]\..*$/
paths:
- hugegraph-hubble/**
- pom.xml
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- /^v[0-9]\..*$/
paths:
- hugegraph-hubble/**
- pom.xml

env:
TRAVIS_DIR: hubble-dist/assembly/travis
TRAVIS_DIR: hugegraph-hubble/hubble-dist/assembly/travis
SERVER_VERSION: 0.12.0

jobs:
@@ -66,23 +72,25 @@ jobs:

- name: Compile
run: |
mvn clean compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
cd hugegraph-hubble && ls *
mvn -e clean compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
- name: Prepare env and service
run: |
sudo pip install -r ${TRAVIS_DIR}/requirements.txt
$TRAVIS_DIR/install-hugegraph.sh $SERVER_VERSION
- name: Unit test
run: mvn test -P unit-test
run: cd hugegraph-hubble && mvn test -P unit-test

- name: API test
env:
CI: false
run: |
$TRAVIS_DIR/run-api-test.sh
cd hugegraph-hubble && ls
hubble-dist/assembly/travis/run-api-test.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3.0.0
with:
file: target/site/jacoco/*.xml
@@ -1,23 +1,29 @@
name: hugegraph-loader ci
name: hugegraph-loader-ci

on:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
paths:
- hugegraph-loader/**
- pom.xml
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
paths:
- hugegraph-loader/**
- pom.xml

jobs:
build:
runs-on: ubuntu-20.04
env:
TRAVIS_DIR: assembly/travis
STATIC_DIR: assembly/static
TRAVIS_DIR: hugegraph-loader/assembly/travis
STATIC_DIR: hugegraph-loader/assembly/static
COMMIT_ID: 1d031c5905cbef008dd5fb468576b0e6a9445181
DB_USER: root
DB_PASS: root
@@ -44,34 +50,24 @@ jobs:
- name: Compile
run: |
mvn install:install-file -Dfile=$STATIC_DIR/lib/ojdbc8-12.2.0.1.jar -DgroupId=com.oracle -DartifactId=ojdbc8 -Dversion=12.2.0.1 -Dpackaging=jar
mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
- name: Init Mysql Env
uses: mirromutth/mysql-action@v1.1
with:
host port: 3306 # Optional, default value is 3306. The port of host
container port: 3306 # Optional, default value is 3306. The port of container
character set server: 'utf8mb4' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
collation server: 'utf8mb4_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
mysql version: '5.7' # Optional, default value is "latest". The version of the MySQL
mysql database: ${{ env.DB_DATABASE }} # Optional, default value is "test". The specified database which will be create
mysql root password: ${{ env.DB_PASS }} # Required if "mysql user" is empty, default is empty. The root superuser password
#mysql user: 'root' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
#mysql password: ${{ secrets.DatabasePassword }} # Required if "mysql user" exists. The password for the "mysql user"
cd hugegraph-loader && ls *
mvn -e compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
- name: Prepare env and service
run: |
$TRAVIS_DIR/install-hadoop.sh
$TRAVIS_DIR/install-mysql.sh ${{ env.DB_DATABASE }} ${{ env.DB_PASS }}
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
- name: Run test
run: |
cd hugegraph-loader && ls
mvn test -P unit
mvn test -P file
mvn test -P hdfs
mvn test -P jdbc
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3.0.0
with:
file: target/jacoco.xml
@@ -1,4 +1,5 @@
name: release package
# TODO: unify all modules later
name: release-package

on:
release:
@@ -1,20 +1,27 @@
name: hugegraph-tools ci
name: hugegraph-tools-ci
on:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
paths:
- hugegraph-tools/**
- pom.xml
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
paths:
- hugegraph-tools/**
- pom.xml

jobs:
build:
runs-on: ubuntu-20.04
env:
TRAVIS_DIR: assembly/travis
TRAVIS_DIR: hugegraph-tools/assembly/travis
COMMIT_ID: 1d031c5905cbef008dd5fb468576b0e6a9445181
steps:
- name: Install JDK 8
@@ -34,14 +41,16 @@ jobs:
fetch-depth: 2
- name: Compile
run: |
mvn compile -Dmaven.javadoc.skip=true
cd hugegraph-tools && ls *
mvn -e compile -Dmaven.javadoc.skip=true
- name: Prepare env and service
run: |
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
- name: Run test
run: |
cd hugegraph-tools && ls *
mvn test -Dtest=FuncTestSuite
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3.0.0
with:
file: target/jacoco.xml
@@ -0,0 +1,54 @@
<assembly>
<id>distribution</id>
<includeBaseDirectory>false</includeBaseDirectory>

<formats>
<format>dir</format>
</formats>

<fileSets>
<fileSet>
<directory>${assembly.static.dir}/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*</include>
</includes>
<fileMode>755</fileMode>
</fileSet>
<fileSet>
<directory>${assembly.static.dir}</directory>
<outputDirectory>/</outputDirectory>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>README*</include>
<include>LICENSE*</include>
<include>NOTICE*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
</fileSets>

<dependencySets>
<!-- Code jars -->
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>*:*:jar:*</include>
</includes>
</dependencySet>
</dependencySets>

</assembly>

0 comments on commit 296d13a

Please sign in to comment.