From e9ffc67f7963279de6010ea2b2adbeb45e454c63 Mon Sep 17 00:00:00 2001 From: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com> Date: Thu, 21 Oct 2021 09:01:36 +0530 Subject: [PATCH] Added check for cypress tests in PR (#8454) --- .github/workflows/pr-labeler.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 76fc33e661..2b96fe7f73 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -13,3 +13,20 @@ jobs: - uses: appsmithorg/labeler@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Get changed files using defaults + id: changed-files + uses: trilom/file-changes-action@v1.2.3 + continue-on-error: true + + - name: Run step when a file changes + uses: actions-ecosystem/action-create-comment@v1 + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: | + contains(steps.changed-files.outputs.files_modified, 'cypress') == false && + contains(steps.changed-files.outputs.files_modified, 'test') == false + with: + github_token: ${{ secrets.github_token }} + body: | + Unable to find test scripts. Please add necessary tests to the PR. \ No newline at end of file