Skip to content

Commit

Permalink
ci: Added step to check if @tag.All is given as expected. (#29926)
Browse files Browse the repository at this point in the history
## Description
> Added step to check if @tag.All mentioned is as expected, if not throw
a message to use `/ok-to-test tags="@tag.All"` and exit the run


#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
> TBP with tags 

#### How Has This Been Tested?
- [x] Manual
- [x] TBP
>

## 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


## Summary by CodeRabbit

The existing bullet-point list is still valid and does not need to be
updated.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
sharanya-appsmith authored Jan 5, 2024
1 parent c6c6d5c commit f5578c1
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/integration-tests-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
issue-number: ${{ github.event.client_payload.pull_request.number }}
body: |
The provided command lacks any tags. Please execute '/ok-to-test' again, specifying the tags you want to include or use `@tag.All` to run all specs.
The provided command lacks any tags. Please execute '/ok-to-test' again, specifying the tags you want to include or use `/ok-to-test tags="@tag.All"` to run all specs.
Explore the tags documentation [here](https://www.notion.so/appsmith/Ok-to-test-With-Tags-7c0fc64d4efb4afebf53348cd6252918)
- name: Stop the workflow run if tags are not present
Expand All @@ -36,14 +36,29 @@ jobs:
id: checkAll
run: |
tags="${{ github.event.client_payload.slash_command.args.named.tags }}"
if [[ $tags == *"@tag.All"* ]]; then
if [[ ($tags == *"ALL"* || $tags == *"All"* || $tags == *"all"*) && $tags != *"@tag.All"* ]]; then
echo "invalid_tags_all=$tags" >> $GITHUB_OUTPUT
elif [[ $tags == *"@tag.All"* ]]; then
echo "tags=" >> $GITHUB_OUTPUT
echo "matrix=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]" >> $GITHUB_OUTPUT
else
echo "tags=$tags" >> $GITHUB_OUTPUT
echo "matrix=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]" >> $GITHUB_OUTPUT
fi
- name: Add comment to use correct @tag.All format
if: steps.checkAll.outputs.invalid_tags_all != ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.client_payload.pull_request.number }}
body: |
Please use `/ok-to-test tags="@tag.All"` to run all specs.
Explore the tags documentation [here](https://www.notion.so/appsmith/Ok-to-test-With-Tags-7c0fc64d4efb4afebf53348cd6252918)
- name: Stop the workflow run if given @tag.All format is wrong
if: steps.checkAll.outputs.invalid_tags_all != ''
run: exit 1

# This step creates a comment on the PR with a link to this workflow run.
- name: Add a comment on the PR with link to workflow run
if: steps.checkTags.outputs.tags == 'true'
Expand Down

0 comments on commit f5578c1

Please sign in to comment.