Skip to content

Commit

Permalink
chore: use .asf.yaml for apache workflow rule & add RAT in action (#266)
Browse files Browse the repository at this point in the history
* chore: add rat check in ci

* refactor the action files
  • Loading branch information
imbajin authored Feb 8, 2023
1 parent 36474dd commit 66b1f78
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 65 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/check-dependencies.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hugegraph-client-ci
name: "hugegraph-client-ci"

on:
push:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/hubble-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hugegraph-hubble-ci
name: "hugegraph-hubble-ci"

on:
push:
Expand All @@ -22,19 +22,19 @@ on:

env:
TRAVIS_DIR: hugegraph-hubble/hubble-dist/assembly/travis
# TODO: need update it later
# TODO: need update it later (eed6103359fe40d2f1476fb8c56d9388c3111a99)
COMMIT_ID: be6ee386b9939dc6bd6fcbdf2274b8acc3a0a314

jobs:
hubble-ci:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
STATIC_DIR: hugegraph-hubble/hubble-dist/assembly/static
steps:
- name: Install JDK 8
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'

# we also should cache python & yarn & downloads to avoid useless work
Expand Down
31 changes: 26 additions & 5 deletions .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@
# under the License.
#

name: License checker
name: "license checker"

on:
push:
branches:
- master
- /^release-.*$/
pull_request:
branches:
- master

jobs:
check-license:
check-license-header:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# A full-featured license tool to check and fix license headers and resolve dependencies' licenses: https://github.com/apache/skywalking-eyes
# More info could refer to: https://github.com/apache/skywalking-eyes
- name: Check License Header
uses: apache/skywalking-eyes@main
env:
Expand All @@ -51,3 +50,25 @@ jobs:
mvn apache-rat:check -ntp
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt
grep "Binaries" merged-rat.txt -C 3 && cat merged-rat.txt
check-dependency-license:
runs-on: ubuntu-latest
env:
SCRIPT_DEPENDENCY: hugegraph-dist/scripts/dependency
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: mvn install
run: |
mvn install -DskipTests=true -ntp
- name: generate current dependencies
run: |
bash $SCRIPT_DEPENDENCY/regenerate_known_dependencies.sh current-dependencies.txt
- name: check third dependencies
run: |
bash $SCRIPT_DEPENDENCY/check_dependencies.sh
10 changes: 5 additions & 5 deletions .github/workflows/loader-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hugegraph-loader-ci
name: "hugegraph-loader-ci"

on:
push:
Expand All @@ -20,7 +20,7 @@ on:

jobs:
loader-ci:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
TRAVIS_DIR: hugegraph-loader/assembly/travis
STATIC_DIR: hugegraph-loader/assembly/static
Expand All @@ -29,11 +29,11 @@ jobs:
DB_PASS: root
DB_DATABASE: load_test
steps:
- name: Install JDK 8
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
java-version: '11'
distribution: 'adopt'

- name: Cache Maven packages
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Mark stale issues and pull requests
name: "Mark stale issues and pull requests"

on:
schedule:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tools-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hugegraph-tools-ci
name: "hugegraph-tools-ci"
on:
push:
branches:
Expand All @@ -19,17 +19,17 @@ on:

jobs:
tools-ci:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
TRAVIS_DIR: hugegraph-tools/assembly/travis
# TODO: could we use one param to unify it? or use a action template
# TODO: could we use one param to unify it? or use a action template (could use one ci file)
COMMIT_ID: be6ee386b9939dc6bd6fcbdf2274b8acc3a0a314
steps:
- name: Install JDK 8
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.stereotype.Component;

/**
* TODO: 404 not found & ensure if we need this class?
* Reference http://www.zizhixiaoshe.com/article/invalidcookie.html
*/
// TODO: remove this class if we don't need it anymore
@Component
public class TomcatServletConfig
implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {
public class TomcatServletConfig implements
WebServerFactoryCustomizer<TomcatServletWebServerFactory> {

@Autowired
private HugeConfig config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public static Object convertObject(Group group, int fieldIndex) {
return object;
}

/**
* TODO: ensure the refer is valid or rewrite it by ourselves
* Reference:https://stackoverflow.com/questions/53690299/int96value-to-date-string
*/
private static Date dateFromInt96(Binary value) {
byte[] int96Bytes = value.getBytes();
// Find Julian day
Expand Down

0 comments on commit 66b1f78

Please sign in to comment.