You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2023/06/06 11:49:14 UTC
[GitHub] [linkis] peacewong commented on a diff in pull request #4601: Support integtation test git action
peacewong commented on code in PR #4601:
URL: https://github.com/apache/linkis/pull/4601#discussion_r1219487089
##########
.github/workflows/integration-test.yml:
##########
@@ -0,0 +1,185 @@
+#
+# 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:
+ - dev-1.4.0
+ pull_request:
+ branches:
+ - dev-1.4.0
+
+#concurrency:
+# group: test-${{ github.head_ref || github.run_id }}
+# cancel-in-progress: true
+
+env:
+ KIND_CONFIG_PATH: './linkis-dist/helm/scripts/resources/kind-cluster.yaml'
+ KIND_CLUSTER_NAME: 'test-helm'
+ MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
+jobs:
+ integration-test:
+ 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: Free up disk space
+ run: |
+ # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
+ # du -sh /* 2> /dev/null | sort -rh 2> /dev/null | head
+ # du -h -d2 /usr 2> /dev/null | sort -rh 2> /dev/null | head
+ echo $JAVA_HOME
+ echo "Check free disk space before cleanup."
+ df -h
+ echo "Removing non-essential tools and libraries."
+ sudo rm -rf "$AGENT_TOOLSDIRECTORY"
+ sudo rm -rf /opt/ghc
+ sudo rm -rf /usr/share/dotnet
+ sudo rm -rf /usr/local/share/boost
+ # delete libraries for Android (12G), PowerShell (1.3G), Swift (1.7G)
+ sudo rm -rf /usr/local/lib/android
+ sudo rm -rf /usr/local/share/powershell
+ sudo rm -rf /usr/share/swift
+ echo "Check free disk space after cleanup."
+ df -h
+ echo $JAVA_HOME
+ - name: Prune docker images
+ run: |
+ echo "Pruning docker images on GH action runner node"
+ docker image prune -a -f
+ docker system df
+ df -h
+
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ submodules: true
+ - 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 -Dmysql.connector.scope=compile -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dlinkis.build.web=true -Dlinkis.build.ldh=true
+
+ - name: Set up chart-testing
+ uses: ./.github/actions/chart-testing-action
+
+
+ - name: Create Kind cluster
+ uses: ./.github/actions/kind-action
+ with:
+ config: ${{ env.KIND_CONFIG_PATH }}
+ node_image: ${{ matrix.kubernetes-version }}
+ cluster_name: ${{ env.KIND_CLUSTER_NAME }}
+
+ - name: Start Linkis Service
+ run: |
+ docker tag linkis:${{ env.LINKIS_VERSION }} linkis:dev
+ docker tag linkis-web:${{ env.LINKIS_VERSION }} linkis-web:dev
+ docker tag linkis-ldh:${{ env.LINKIS_VERSION }} linkis-ldh:dev
+
+ #先直接下载镜像 后续调整为主动构建
Review Comment:
use english
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org