You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2023/05/27 09:53:16 UTC
[linkis] branch dev-1.4.0-integration-test updated: add integration-test.yml
This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev-1.4.0-integration-test
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/dev-1.4.0-integration-test by this push:
new 772c560cd add integration-test.yml
772c560cd is described below
commit 772c560cde4b433495a0d359086ee19ac94d0434
Author: casionone <ca...@gmail.com>
AuthorDate: Sat May 27 17:52:53 2023 +0800
add integration-test.yml
---
.github/workflows/integration-test.yml | 181 +++++++++++++++++++++++++++++++++
1 file changed, 181 insertions(+)
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
new file mode 100644
index 000000000..2c4361984
--- /dev/null
+++ b/.github/workflows/integration-test.yml
@@ -0,0 +1,181 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Integration Test
+
+on:
+ push:
+ branches:
+ - master
+ - dev-1.4.0-integration-test
+ pull_request:
+ branches:
+ - master
+ - dev-1.4.0-integration-test
+
+concurrency:
+ group: test-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+env:
+ CT_CONFIG_PATH: '.github/ct.yml'
+ KIND_CONFIG_PATH: './helm/scripts/resources/kind-cluster.yaml'
+
+jobs:
+ publish-docker:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: [16.0.0]
+ kubernetes-version:
+ - 'kindest/node:v1.21.10'
+ - 'kindest/node:v1.23.4'
+ timeout-minutes: 90
+ env:
+ TAG: ${{ github.sha }}
+ SKIP_TEST: true
+ HUB: ghcr.io/apache/linkis
+ LINKIS_VERSION: 1.4.0-SNAPSHOT
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'adopt'
+ java-version: 8
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Build frontend by node.js
+ run: |
+ cd linkis-web
+ sed -i "/VUE_APP_MN_CONFIG_PREFIX/d" .env
+ npm install
+ npm run build
+
+ - name: Build backend by maven
+ run: |
+ ./mvnw install -Pdocker -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dlinkis.build.web=true -Dlinkis.build.with.jdbc=true -Dlinkis.build.ldh=true
+
+
+ - name: Set up chart-testing
+ uses: ./.github/actions/chart-testing-action
+
+# - name: List changed charts
+# id: list-changed
+# run: |
+# changed=$(ct list-changed --config ${{ env.CT_CONFIG_PATH }} --target-branch ${{ github.event.repository.default_branch }})
+# if [[ -n "$changed" ]]; then
+# echo "changed=true" >> $GITHUB_OUTPUT
+# echo "Changed charts: $changed"
+# else
+# echo "Charts are not changed, they will not be linted, validated, installed and tested."
+# fi
+
+# # NOTE: If the charts have not changed, they will not be linted, validated, installed and tested.
+# - name: Lint and validate charts
+# run: ct lint --config ${{ env.CT_CONFIG_PATH }}
+
+ - name: Create Kind cluster
+ if: ${{ steps.list-changed.outputs.changed == 'true' }}
+ uses: ./.github/actions/kind-action
+ with:
+ config: ${{ env.KIND_CONFIG_PATH }}
+ node_image: ${{ matrix.kubernetes-version }}
+
+# - name: Install and test charts
+# if: ${{ success() && steps.list-changed.outputs.changed == 'true' }}
+# run: ct install --config ${{ env.CT_CONFIG_PATH }}
+
+# linkis-on-k8s-it:
+# name: Linkis Server On Kubernetes Integration Test
+# runs-on: ubuntu-22.04
+# strategy:
+# matrix:
+#
+# steps:
+# - name: Checkout
+# uses: actions/checkout@v3
+# # https://github.com/docker/build-push-action
+# - name: Set up Docker Buildx
+# uses: docker/setup-buildx-action@v2
+# - name: Build Linkis Docker Image
+# uses: docker/build-push-action@v3
+# with:
+# # passthrough CI into build container
+# build-args: |
+# CI=${CI}
+# MVN_ARG=--flink-provided --hive-provided -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -DskipTests
+# context: .
+# file: build/Dockerfile
+# load: true
+# tags: apache/linkis:latest
+# - name: Cache Engine Archives
+# uses: ./.github/actions/cache-engine-archives
+# - name: Setup Minikube
+# run: |
+# # https://minikube.sigs.k8s.io/docs/start/
+# curl -LO https://github.com/kubernetes/minikube/releases/download/${MINIKUBE_VERSION}/minikube-linux-amd64
+# sudo install minikube-linux-amd64 /usr/local/bin/minikube
+# minikube start --cpus 2 --memory 4096 --kubernetes-version=${KUBERNETES_VERSION} --force
+# # https://minikube.sigs.k8s.io/docs/handbook/pushing/#7-loading-directly-to-in-cluster-container-runtime
+# minikube image load apache/linkis:latest
+# - name: kubectl pre-check
+# run: |
+# kubectl get nodes
+# kubectl get serviceaccount
+# kubectl create serviceaccount linkis
+# kubectl create clusterrolebinding linkis-role --clusterrole=edit --serviceaccount=default:linkis
+# kubectl get serviceaccount
+# - name: start linkis
+# run: kubectl apply -f integration-tests/linkis-kubernetes-it/src/test/resources/linkis-server.yaml
+# - name: linkis pod check
+# run: |
+# kubectl get pods
+# kubectl describe pods linkis-test
+# - name: integration tests
+# run: >-
+# ./build/mvn ${MVN_OPT} clean install
+# -pl integration-tests/linkis-kubernetes-it -am
+# -Pkubernetes-it
+# -Dtest=none -DwildcardSuites=org.apache.linkis.kubernetes.test.deployment,org.apache.linkis.kubernetes.test.KubernetesUtilsTest
+# - name: Cat linkis server log
+# if: failure()
+# run: kubectl logs linkis-test
+# - name: Cat spark driver log
+# if: failure()
+# run: |
+# kubectl get pods
+# kubectl get pods | grep driver | awk -F " " '{print$1}' | xargs -I {} kubectl logs {}
+# - name: Upload test logs
+# if: failure()
+# uses: actions/upload-artifact@v3
+# with:
+# name: unit-tests-log-linkis-on-k8s-it
+# path: |
+# **/target/unit-tests.log
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org