From 6bf812cdc93ebe7ec3b5ef38a315407a58834479 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Thu, 7 Apr 2022 22:48:18 +0530 Subject: [PATCH] .github: fix github action workflows (commiting this directly to main, otherwise the PR will kick the actions of the PR branch) Signed-off-by: Rohit Yadav --- ...-request-checks.yml => coverage-check.yml} | 18 ++++------- .github/workflows/linter.yml | 32 +++++++++++++++++++ .github/workflows/merge-conflict-checker.yml | 6 ++-- 3 files changed, 41 insertions(+), 15 deletions(-) rename .github/workflows/{pull-request-checks.yml => coverage-check.yml} (81%) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/coverage-check.yml similarity index 81% rename from .github/workflows/pull-request-checks.yml rename to .github/workflows/coverage-check.yml index b44bc6f89b1..522c635a437 100644 --- a/.github/workflows/pull-request-checks.yml +++ b/.github/workflows/coverage-check.yml @@ -15,19 +15,19 @@ # specific language governing permissions and limitations # under the License. -name: Check Pull Request +name: PR Quality Check on: [pull_request] jobs: build: - name: Check Pull Request + name: JaCoCo Coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: '11' @@ -46,13 +46,7 @@ jobs: with: paths: ${{ github.workspace }}/client/target/site/jacoco-aggregate/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} - min-coverage-overall: 0 + min-coverage-overall: 10 min-coverage-changed-files: 80 title: PR Code Coverage - debug-mode: true - - - name: SuperLinter Lint Checks - uses: github/super-linter@v4 - env: - VALIDATE_PYTHON_FLAKE8: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + debug-mode: false diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000000..32ba10adf27 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,32 @@ +# 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: Lint Code Base + +on: [pull_request] + +jobs: + build: + name: SuperLinter Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: SuperLinter + uses: github/super-linter@v4 + env: + VALIDATE_PYTHON_FLAKE8: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/merge-conflict-checker.yml b/.github/workflows/merge-conflict-checker.yml index 363eaba0979..bb3e4fbd2a0 100644 --- a/.github/workflows/merge-conflict-checker.yml +++ b/.github/workflows/merge-conflict-checker.yml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: "Check Pull Requests Conflict" +name: "PR Merge Conflict Check" on: push: pull_request_target: @@ -25,11 +25,11 @@ jobs: triage: runs-on: ubuntu-latest steps: - - name: Check Pull Requests Conflict + - name: Conflict Check uses: eps1lon/actions-label-merge-conflict@v2.0.0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" dirtyLabel: "status:has-conflicts" removeOnDirtyLabel: "status:ready-for-review" continueOnMissingPermissions: true - commentOnDirty: "Hi @${{ github.event.pull_request.user.login }}, your pull request has merge conflicts. Can you fix the conflicts and sync your branch with the base branch?" + commentOnDirty: "Hi @${{ github.actor }}, your pull request has merge conflicts. Can you fix the conflicts and sync your branch with the base branch?"