From 08f625e754abfc0b44fb225a14753ce514633e6c Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Fri, 1 Dec 2023 23:13:15 +0530 Subject: [PATCH] ci: Modifying the CI workflows for ok-to-test to leverage Cypress tags (#28944) ## Description If the user types `ok-to-test tags=Git`, Cypress should only run the specs marked with the Git tag Related to #28943 #### Type of change - New feature (non-breaking change which adds functionality) ## Testing #### How Has This Been Tested? - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress #### 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 --- .github/workflows/ci-test-custom-script.yml | 5 +++++ .github/workflows/integration-tests-command.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/ci-test-custom-script.yml b/.github/workflows/ci-test-custom-script.yml index b892d40f20..18eb6ec488 100644 --- a/.github/workflows/ci-test-custom-script.yml +++ b/.github/workflows/ci-test-custom-script.yml @@ -9,6 +9,10 @@ on: description: "This is the PR number in case the workflow is being called in a pull request" required: false type: number + tags: + description: "These are the optional tags a developer can specify in order to run a subset of all the tests" + required: false + type: string jobs: ci-test: @@ -383,6 +387,7 @@ jobs: CYPRESS_DB_PWD: ${{ secrets.CYPRESS_DB_PWD }} CYPRESS_S3_ACCESS: ${{ secrets.CYPRESS_S3_ACCESS }} CYPRESS_S3_SECRET: ${{ secrets.CYPRESS_S3_SECRET }} + CYPRESS_grepTags: ${{ inputs.tags }} # This is a comma separated list of tags to run a subset of the suite CYPRESS_SKIP_FLAKY: true with: browser: ${{ env.BROWSER_PATH }} diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index 0309f58782..8c653a611a 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -19,6 +19,7 @@ jobs: Workflow: `${{ github.workflow }}`. Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`. PR: ${{ github.event.client_payload.pull_request.number }}. + Tags: `${{ github.event.client_payload.slash_command.args.named.tags }}`. server-build: name: server-build @@ -69,6 +70,7 @@ jobs: secrets: inherit with: pr: ${{ github.event.client_payload.pull_request.number }} + tags: ${{ github.event.client_payload.slash_command.args.named.tags }} ci-test-result: needs: [ci-test]