| 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 |
| steps: |
| - name: Install JDK 8 |
| uses: actions/setup-java@v2 |
| with: |
| java-version: '8' |
| distribution: 'adopt' |
| |
| - name: Setup Minikube-Kubernetes |
| uses: manusa/actions-setup-minikube@v2.4.2 |
| with: |
| minikube version: v1.21.0 |
| kubernetes version: v1.20.1 |
| - name: Interact with the cluster |
| run: 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: Checkout |
| uses: actions/checkout@v2 |
| with: |
| fetch-depth: 2 |
| |
| - name: Compile |
| run: mvn clean compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded" |
| |
| - name: Prepare env and service |
| env: |
| TRAVIS_DIR: computer-dist/src/assembly/travis |
| COMMIT_ID: e65641517361d7da7ef1801489c15e3af7863a39 |
| run: | |
| $TRAVIS_DIR/install-env.sh |
| $TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID | grep -v "Downloading\|Downloaded" |
| $TRAVIS_DIR/load-data-into-hugegraph.sh |
| |
| - 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 |