From bda53ce421faa889a2624632eab177782ef0f9fb Mon Sep 17 00:00:00 2001 From: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com> Date: Mon, 12 Feb 2024 06:29:17 +0530 Subject: [PATCH] CI: Trigger auto-analysis for cypress runs (#30659) ## Description #### PR fixes following issue(s) Fixes # (issue number) #### Media #### Type of change - New feature (non-breaking change which adds functionality) ## Testing #### How Has This Been Tested? - [X] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress #### Test Plan ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed ## Summary by CodeRabbit - **Chores** - Introduced a new step in the CI/CD pipeline to trigger an automated analysis workflow. --- .github/workflows/test-build-docker-image.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index 0ca0c30b85..15adab6ce9 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -201,6 +201,32 @@ jobs: SLACK_FOOTER: "Push Workflow" SLACK_MESSAGE: ${{steps.slack_notification.outputs.slack_message}} + # Dump github context for future use + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: | + echo "$GITHUB_CONTEXT" + echo ${{ github.repository }} + + # This step triggers an external workflow for automated analysis of Cypress test runs. + - name: Invoke Automated analysis workflow + run: | + curl --location --request POST ${{secrets.CYPRESS_WORKFLOW_API}} \ + --header 'x-appsmith-key: ${{ secrets.CYPRESS_WORKFLOW_KEY }}' \ + --header 'Content-Type: application/json' \ + --data-raw '{ "workflow_id" : ${{ github.run_id }} , + "commit_id" : "${{ github.sha }}" , + "repo" : "${{ github.event.repository.full_name }}" , + "task" : "${{ github.job }}" , + "workflow_type" : "${{ github.event_name }}", + "workflow_name" : "${{ github.workflow }}", + "job_id" : "", + "job_data": { + "ci_test_result_sample_data" : "sample_data" + } + }' + # Force save the CI failed spec list into a cache - name: Store the combined run result for CI if: needs.ci-test.result != 'success'