Skip to content

Commit

Permalink
chore: adopt mysql ci with action & upgrade ubuntu version (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Dec 20, 2021
1 parent 5e30894 commit d38fe1b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
build:
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
env:
TRAVIS_DIR: assembly/travis
STATIC_DIR: assembly/static
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
distribution: 'zulu'

- name: Cache Maven packages
uses: actions/cache@v2
Expand All @@ -46,11 +46,22 @@ jobs:
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"

- name: Prepare env and service
run: |
$TRAVIS_DIR/install-hadoop.sh
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASS }}
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID | grep -v "Downloading\|Downloaded"
- name: Run test
Expand Down
2 changes: 1 addition & 1 deletion assembly/travis/install-hugegraph-from-source.sh
Expand Up @@ -22,7 +22,7 @@ tar -zxvf hugegraph-*.tar.gz
HTTPS_SERVER_DIR="hugegraph_https"
mkdir ${HTTPS_SERVER_DIR}
cp -r hugegraph-*/. ${HTTPS_SERVER_DIR}
cd hugegraph-*
cd "$(find hugegraph-* | head -1)"
# start HugeGraphServer with http protocol
bin/init-store.sh || exit 1
bin/start-hugegraph.sh || exit 1
Expand Down

0 comments on commit d38fe1b

Please sign in to comment.