refact(core): adaptor for common 1.2 & fix a string of possible CI problem #1454
Workflow file for this run
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
name: "hugegraph-computer ci" | |
on: | |
push: | |
branches: | |
- master | |
- /^release-.*$/ | |
pull_request: | |
jobs: | |
computer-ci: | |
runs-on: ubuntu-latest | |
env: | |
USE_STAGE: 'true' # Whether to include the stage repository. | |
TRAVIS_DIR: computer-dist/src/assembly/travis | |
KUBERNETES_VERSION: 1.20.1 | |
# TODO: update it before release | |
HUGEGRAPH_SERVER_COMMIT_ID: d01c8737d7d5909119671953521f1401dcd1a188 | |
BSP_ETCD_URL: http://localhost:2579 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install JDK 8 for HDFS | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'zulu' | |
- name: License check(RAT) | |
run: | | |
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 | |
- name: Setup Python3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Cache HDFS packages | |
uses: actions/cache@v3 | |
id: hdfs-cache | |
with: | |
path: ~/hadoop-3.3.2.tar.gz | |
key: ${{ runner.os }}--hadoop | |
restore-keys: ${{ runner.os }}-hadoop | |
- name: Download HDFS | |
if: steps.hdfs-cache.outputs.cache-hit != 'true' | |
run: wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz -O ~/hadoop-3.3.2.tar.gz | |
- name: Setup HDFS | |
run: $TRAVIS_DIR/install-hdfs.sh | |
- name: Setup Minikube-Kubernetes | |
run: $TRAVIS_DIR/install-k8s.sh | |
- name: Check Component | |
run: | | |
sleep 5 | |
curl localhost:9000 | |
kubectl get nodes | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Prepare env and service | |
run: | | |
$TRAVIS_DIR/install-env.sh | |
# TODO: use docker image to replace it | |
$TRAVIS_DIR/install-hugegraph-from-source.sh $HUGEGRAPH_SERVER_COMMIT_ID | |
$TRAVIS_DIR/load-data-into-hugegraph.sh | |
- name: Install JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'zulu' | |
- name: Use staged maven repo | |
if: ${{ env.USE_STAGE == 'true' }} | |
run: | | |
cp $HOME/.m2/settings.xml /tmp/settings.xml | |
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
- name: Compile | |
run: mvn clean compile -Dmaven.javadoc.skip=true -ntp | |
- name: Integrate test | |
run: mvn test -P integrate-test -ntp | |
- name: Unit test | |
run: mvn test -P unit-test -ntp | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: target/site/jacoco/jacoco.xml |