This is an automated email from the ASF dual-hosted git repository. gyfora pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git
commit e73d4d5c260e3fdd478697daccdccf3e6774771c Author: wangyang0918 <danrtsey...@alibaba-inc.com> AuthorDate: Wed Feb 16 12:14:59 2022 +0800 [FLINK-26142] Enable github actions and run unit tests --- .github/workflows/ci.yml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7b3c557 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +################################################################################ +# 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: CI +on: + push: + pull_request: +jobs: + test_ci: + runs-on: ubuntu-latest + name: test_ci + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Maven + run: mvn clean install + - name: Start minikube + uses: medyagh/setup-minikube@master + - name: Install cert-manager + run: | + kubectl get pods -A + kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.7.1/cert-manager.yaml + kubectl -n cert-manager wait --all=true --for=condition=Ready --timeout=300s pod + - name: Build image + run: | + export SHELL=/bin/bash + export DOCKER_BUILDKIT=1 + eval $(minikube -p minikube docker-env) + docker build -f ./Dockerfile -t flink-kubernetes-operator:ci-latest . + docker images + - name: Start the operator + run: | + helm install flink-operator helm/flink-operator --set image.repository=flink-kubernetes-operator --set image.tag=ci-latest + kubectl wait --for=condition=Available --timeout=120s deploy/flink-operator + kubectl get pods + - name: Tests in flink-kubernetes-operator + run: | + cd flink-kubernetes-operator + mvn integration-test -Dit.skip=false + cd .. + - name: Tests in flink-kubernetes-webhook + run: | + cd flink-kubernetes-webhook + mvn integration-test -Dit.skip=false + cd .. + - name: Stop the operator + run: | + helm uninstall flink-operator +