From a9e16ee6c010db1e8237455d4aa2479d73dbe9cd Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Thu, 13 Aug 2020 14:50:34 +0530 Subject: [PATCH] Adding dummy check in server build to satisfy required status checks (#296) This is a hack to get around the fact that Github Actions doesn't support conditional status checks for monorepo PRs. Hence, we create similar jobs in the both server & client builds. In the server build, those jobs are dummy jobs that do nothing but satisfy the all-encompassing green tick so that PRs can be merged without using Admin privileges. --- .github/workflows/client.yml | 1 - .github/workflows/server.yml | 33 +++++++++++++++++++++++++++++++++ app/server/README.md | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index e7659c8bf3..61df986665 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -75,7 +75,6 @@ jobs: ui-test: needs: build runs-on: ubuntu-latest - # container: appsmith/cypress-nginx defaults: run: working-directory: app/client diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index d523607c7d..0f51fb356f 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -82,3 +82,36 @@ jobs: docker build -t appsmith/appsmith-server:nightly . echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin docker push appsmith/appsmith-server + + # These are dummy jobs in the CI build to satisfy required status checks for merging PRs. This is a hack because Github doesn't support conditional + # required checks in monorepos. These jobs are a clone of similarly named jobs in client.yml. + # + # Check support request at: https://github.community/t/feature-request-conditional-required-checks/16761 + ui-test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + job: [0, 1, 2, 3, 4, 5, 6] + + steps: + # Checkout the code + - uses: actions/checkout@v2 + + - name: Do nothing as this is a dummy step + shell: bash + run: | + exit 0 + + package: + runs-on: ubuntu-latest + + steps: + # Checkout the code + - uses: actions/checkout@v2 + + - name: Do nothing as this is a dummy step + shell: bash + run: | + exit 0 + \ No newline at end of file diff --git a/app/server/README.md b/app/server/README.md index 9e32d92265..e6450c3c95 100644 --- a/app/server/README.md +++ b/app/server/README.md @@ -12,7 +12,7 @@ For example: $ ./build.sh -DskipTests ``` -This will +This script will perform the following steps: 1. Compile the code 2. Generate the jars for server & plugins 3. Copy them into the `dist` directory