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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Introduced a new step in the CI/CD pipeline to trigger an automated
analysis workflow.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
yatinappsmith 2024-02-12 06:29:17 +05:30 committed by GitHub
parent 7652f6695d
commit bda53ce421
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'