blob: 43ac3d55368985b944fe42ea9ce0ae4bb2123de2 [file] [log] [blame]
name: hugegraph-computer ci
on:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- /^v[0-9]\..*$/
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- /^v[0-9]\..*$/
jobs:
computer-ci:
runs-on: ubuntu-20.04
env:
TRAVIS_DIR: computer-dist/src/assembly/travis
KUBERNETES_VERSION: 1.20.1
HUGEGRAPH_SERVER_COMMIT_ID: 848b8fb17804ddc561af832dff0bdc3f6221c904
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
- name: Setup Python3
uses: actions/setup-python@v2
with:
python-version: '3.8'
- 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@v2
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
$TRAVIS_DIR/install-hugegraph-from-source.sh $HUGEGRAPH_SERVER_COMMIT_ID | grep -v "Downloading\|Downloaded"
$TRAVIS_DIR/load-data-into-hugegraph.sh
- name: Install JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'
- name: Compile
run: mvn clean compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
- name: Integrate test
run: mvn test -P integrate-test
- name: Unit test
run: mvn test -P unit-test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: target/site/jacoco/jacoco.xml