This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch exp_github_actions in repository https://gitbox.apache.org/repos/asf/flink.git
commit 464c5325e974b3b97b1a2219c5979142bbe90603 Author: Chesnay Schepler <ches...@apache.org> AuthorDate: Tue Mar 29 16:06:26 2022 +0200 add dedicated validation job --- .github/workflows/flink-ci-template.yml | 23 ++++++++++++++++++++ tools/ci/compile.sh | 2 +- tools/ci/validate.sh | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/.github/workflows/flink-ci-template.yml b/.github/workflows/flink-ci-template.yml index af080f3d162..a5c957ba8a6 100644 --- a/.github/workflows/flink-ci-template.yml +++ b/.github/workflows/flink-ci-template.yml @@ -47,6 +47,29 @@ env: CHECKOUT_DIR: ${{ github.workspace }}/flink-checkout jobs: + qa: + name: "Basic QA" + runs-on: ubuntu-latest + container: + image: chesnay/flink-ci:java_8_11_xenial + options: --init + + steps: + - name: "Set JDK version" + run: | + echo "JAVA_HOME=$JAVA_HOME_${{inputs.jdk-version}}_X64" >> ${GITHUB_ENV} + echo "PATH=$JAVA_HOME_${{inputs.jdk-version}}_X64/bin:$PATH" >> ${GITHUB_ENV} + + - name: "Flink Checkout" + uses: actions/checkout@v2 + - name: "Codestyle" + run: | + ${{ inputs.environment }} ./tools/ci/validate.sh "checkstyle:check spotless:check -T2" || exit $? + + - name: "License Headers" + run: | + ${{ inputs.environment }} ./tools/ci/validate.sh "org.apache.rat:apache-rat-plugin:check -N" || exit $? + compile: name: "Compile" runs-on: ubuntu-latest diff --git a/tools/ci/compile.sh b/tools/ci/compile.sh index e6013f9650f..043755b5a0b 100755 --- a/tools/ci/compile.sh +++ b/tools/ci/compile.sh @@ -48,7 +48,7 @@ echo "========================================================================== EXIT_CODE=0 run_mvn clean deploy -DaltDeploymentRepository=validation_repository::default::file:$MVN_VALIDATION_DIR -Dflink.convergence.phase=install -Pcheck-convergence -Dflink.forkCount=2 \ - -Dflink.forkCountTestPackage=2 -Dmaven.javadoc.skip=true -U -DskipTests | tee $MVN_CLEAN_COMPILE_OUT + -Dflink.forkCountTestPackage=2 -Dmaven.javadoc.skip=true -U -DskipTests -Dcheckstyle.skip=true -Drat.skip=true -Dspotless.skip=true | tee $MVN_CLEAN_COMPILE_OUT EXIT_CODE=${PIPESTATUS[0]} diff --git a/tools/ci/validate.sh b/tools/ci/validate.sh new file mode 100755 index 00000000000..de639e0582c --- /dev/null +++ b/tools/ci/validate.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +################################################################################ +# 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. +################################################################################ + +# +# This file contains tooling for validating Flink +# + +HERE="`dirname \"$0\"`" # relative +HERE="`( cd \"$HERE\" && pwd )`" # absolutized and normalized +if [ -z "$HERE" ] ; then + exit 1 # fail +fi +CI_DIR="$HERE/../ci" + +# source required ci scripts +source "${CI_DIR}/maven-utils.sh" + +echo "Maven version:" +run_mvn -version + +run_mvn ${1} +