Skip to content

Commit 6dd1e93

Browse files
authored
Merge branch 'master' into enhance-swagger
2 parents a10708c + 958193d commit 6dd1e93

25 files changed

+311
-328
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
BACKEND: [memory, cassandra, scylladb, hbase, rocksdb, mysql, postgresql]
30-
JAVA_VERSION: ['8', '11']
29+
BACKEND: [ memory, cassandra, scylladb, hbase, rocksdb, mysql, postgresql ]
30+
JAVA_VERSION: [ '8', '11' ]
3131

3232
steps:
3333
- name: Install JDK ${{ matrix.JAVA_VERSION }}
@@ -56,23 +56,22 @@ jobs:
5656
5757
- name: Compile
5858
run: |
59-
mvn clean compile -U -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
59+
mvn clean compile -U -Dmaven.javadoc.skip=true -ntp
6060
6161
- name: Install JDK 8
6262
uses: actions/setup-java@v3
6363
with:
6464
java-version: '8'
6565
distribution: 'zulu'
66-
6766
- name: Prepare env and service
6867
run: |
6968
$TRAVIS_DIR/install-backend.sh $BACKEND
7069
7170
- name: Install JDK ${{ matrix.JAVA_VERSION }}
7271
uses: actions/setup-java@v3
7372
with:
74-
java-version: ${{ matrix.JAVA_VERSION }}
75-
distribution: 'zulu'
73+
java-version: ${{ matrix.JAVA_VERSION }}
74+
distribution: 'zulu'
7675

7776
- name: Run unit test
7877
run: |

.github/workflows/codeql-analysis.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,40 @@ jobs:
2626
language: [ 'java' ]
2727

2828
steps:
29-
- name: Checkout repository
30-
uses: actions/checkout@v3
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
3131

32-
- name: Setup Java JDK
33-
uses: actions/setup-java@v3
34-
with:
35-
distribution: 'zulu'
36-
java-version: '8'
32+
- name: Setup Java JDK
33+
uses: actions/setup-java@v3
34+
with:
35+
distribution: 'zulu'
36+
java-version: '8'
3737

38-
# Initializes the CodeQL tools for scanning.
39-
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v2
41-
with:
42-
languages: ${{ matrix.language }}
43-
# If you wish to specify custom queries, you can do so here or in a config file.
44-
# By default, queries listed here will override any specified in a config file.
45-
# Prefix the list here with "+" to use these queries and those in the config file.
46-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
38+
# Initializes the CodeQL tools for scanning.
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v2
41+
with:
42+
languages: ${{ matrix.language }}
43+
# If you wish to specify custom queries, you can do so here or in a config file.
44+
# By default, queries listed here will override any specified in a config file.
45+
# Prefix the list here with "+" to use these queries and those in the config file.
46+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4747

48-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
49-
# If this step fails, then you should remove it and run the build manually (see below)
50-
- name: Autobuild
51-
uses: github/codeql-action/autobuild@v2
48+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
49+
# If this step fails, then you should remove it and run the build manually (see below)
50+
- name: Autobuild
51+
uses: github/codeql-action/autobuild@v2
5252

53-
# ℹ️ Command-line programs to run using the OS shell.
54-
# 📚 https://git.io/JvXDl
53+
# ℹ️ Command-line programs to run using the OS shell.
54+
# 📚 https://git.io/JvXDl
5555

56-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
57-
# and modify them (or add more) to build your code if your project
58-
# uses a compiled language
56+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
57+
# and modify them (or add more) to build your code if your project
58+
# uses a compiled language
5959

60-
#- run: |
61-
# make bootstrap
62-
# make release
60+
#- run: |
61+
# make bootstrap
62+
# make release
6363

64-
- name: Perform CodeQL Analysis
65-
uses: github/codeql-action/analyze@v2
64+
- name: Perform CodeQL Analysis
65+
uses: github/codeql-action/analyze@v2
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Validate Apache Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_version:
7+
required: true
8+
default: '1.0.0'
9+
deploy:
10+
required: true
11+
default: false
12+
type: boolean
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
env:
18+
SCRIPT_PATH: hugegraph-dist/scripts/
19+
steps:
20+
- name: Checkout source
21+
uses: actions/checkout@v3
22+
- name: Install JDK ${{ matrix.java_version }}
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: ${{ matrix.java_version }}
26+
distribution: 'adopt'
27+
- name: Cache Maven packages
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.m2
31+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
32+
restore-keys: ${{ runner.os }}-m2
33+
- name: Get Yarn path
34+
id: yarn-cache-dir-path
35+
run: echo "::set-output name=dir::$(yarn cache dir)"
36+
- name: Cache Yarn packages
37+
uses: actions/cache@v3
38+
# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
39+
id: yarn-cache
40+
with:
41+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
42+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
43+
restore-keys: |
44+
${{ runner.os }}-yarn-
45+
46+
47+
# TODO: do we need svn & gpg environment?
48+
- name: Test Building Source & Running
49+
run: |
50+
bash $SCRIPT_PATH/validate-release.sh ${{ inputs.release_version }} ${{ matrix.java_version }}
51+
- name: Test Running Binary
52+
run: |
53+
echo "TODO: separate script to test binary"
54+
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
java_version: [ '8', '11' ]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

NOTICE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ Copyright 2022-2023 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
6+
7+
The initial codebase was donated to the ASF by HugeGraph Authors, copyright 2017-2021.

hugegraph-dist/pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,29 @@
172172
<plugin>
173173
<artifactId>maven-antrun-plugin</artifactId>
174174
<executions>
175+
<execution>
176+
<id>download-swagger-ui</id>
177+
<phase>package</phase>
178+
<goals>
179+
<goal>run</goal>
180+
</goals>
181+
<configuration>
182+
<tasks>
183+
<echo file="${project.basedir}/dist.sh">
184+
wget https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz
185+
tar zxvf v4.15.5.tar.gz
186+
echo "window.onload = function() { window.ui = SwaggerUIBundle({
187+
url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout',
188+
presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ],
189+
plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > swagger-ui-4.15.5/dist/swagger-initializer.js
190+
cp -r swagger-ui-4.15.5/dist ../${final.name}/swagger-ui
191+
</echo>
192+
<exec executable="${shell-executable}" dir="${project.basedir}" failonerror="true">
193+
<arg line="./dist.sh"/>
194+
</exec>
195+
</tasks>
196+
</configuration>
197+
</execution>
175198
<execution>
176199
<phase>package</phase>
177200
<goals>

hugegraph-dist/release-docs/NOTICE

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
Apache HugeGraph
2-
Copyright 2021-2022 The Apache Software Foundation
1+
Apache HugeGraph(incubating)
2+
Copyright 2022-2023 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).
66

7+
The initial codebase was donated to the ASF by HugeGraph Authors, copyright 2017-2021.
8+
79
========================================================================
810

911
audience-annotations NOTICE

0 commit comments

Comments
 (0)