diff --git a/.github/workflows/integration-tests-command-2.yml b/.github/workflows/integration-tests-command-2.yml
index 7632128b08..2153ea9548 100644
--- a/.github/workflows/integration-tests-command-2.yml
+++ b/.github/workflows/integration-tests-command-2.yml
@@ -170,109 +170,58 @@ jobs:
echo "$new_failed_spec_env" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- - name: Add a comment on the PR with new CI failures
+ - name: Modify test response in the PR with new CI failures
if: needs.ci-test.result != 'success' && steps.combine_ci.outputs.specs_failed == '1'
- uses: peter-evans/create-or-update-comment@v3
+ uses: nefrob/pr-description@v1.1.1
with:
- issue-number: ${{ github.event.number }}
- body: |
- Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
- Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`.
- Cypress dashboard: Click here!
- The following are new failures, please fix them before merging the PR: ${{env.new_failed_spec_env}}
- To know the list of identified flaky tests - Refer here
+ content: |
+ ################# _Do Not Edit This Area_ #################
+ #### ok-to-test Response:
+ Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
+ Commit: `${{ github.event.pull_request.head.sha }}`.
+ Cypress dashboard: Click here!
+ The following are new failures, please fix them before merging the PR: ${{env.new_failed_spec_env}}
+ To know the list of identified flaky tests - Refer here
- - name: Add a comment on the PR when ci-test is failed but no specs found
+ ###################################################
+ regex: "################# _Do Not Edit This Area_ #################.*?###################################################"
+ regexFlags: ims
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Modify test response in the PR when ci-test is failed but no specs found
if: needs.ci-test.result != 'success' && steps.combine_ci.outputs.specs_failed == '0'
- uses: peter-evans/create-or-update-comment@v3
+ uses: nefrob/pr-description@v1.1.1
with:
- issue-number: ${{ github.event.number }}
- body: |
- Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
- Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`.
- Cypress dashboard url: Click here!
- It seems like **no tests ran** 😔. We are not able to recognize it, please check workflow here.
+ content: |
+ ################# _Do Not Edit This Area_ #################
+ #### ok-to-test Response:
+ Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
+ Commit: `${{ github.event.pull_request.head.sha }}`.
+ Cypress dashboard url: Click here!
+ It seems like **no tests ran** 😔. We are not able to recognize it, please check workflow here.
- - name: Add a comment on the PR when ci-test is success
+ ###################################################
+ regex: "################# _Do Not Edit This Area_ #################.*?###################################################"
+ regexFlags: ims
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Modify test response in the PR when ci-test is success
if: needs.ci-test.result == 'success' && steps.combine_ci.outputs.specs_failed == '0'
- uses: peter-evans/create-or-update-comment@v3
+ uses: nefrob/pr-description@v1.1.1
with:
- issue-number: ${{ github.event.number }}
- body: |
- Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
- Commit: `${{ github.event.client_payload.slash_command.args.named.sha }}`.
- Cypress dashboard url: Click here!
- All cypress tests have passed 🎉🎉🎉
+ content: |
+ ################# _Do Not Edit This Area_ #################
+ #### ok-to-test Response:
+ Workflow run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
+ Commit: `${{ github.event.pull_request.head.sha }}`.
+ Cypress dashboard url: Click here!
+ All cypress tests have passed 🎉🎉🎉
+
+ ###################################################
+ regex: "################# _Do Not Edit This Area_ #################.*?###################################################"
+ regexFlags: ims
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Check ci-test set status
if: needs.ci-test.result != 'success'
- run: exit 1
-
- package:
- needs: [ci-test]
- runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: app/client
- # Run this job only if all the previous steps are a success and the reference if the release or master branch
- if: success() && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/master')
-
- steps:
- # Update check run called "package"
- - name: Mark package job as complete
- uses: actions/github-script@v6
- id: update-check-run
- if: ${{ always() }}
- env:
- run_id: ${{ github.run_id }}
- repository: ${{ github.repository }}
- number: ${{ github.event.number }}
- job: ${{ github.job }}
- # Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
- conclusion: ${{ job.status }}
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const { data: pull } = await github.rest.pulls.get({
- ...context.repo,
- pull_number: process.env.number
- });
- const ref = pull.head.sha;
-
- const { data: checks } = await github.rest.checks.listForRef({
- ...context.repo,
- ref
- });
-
- const check = checks.check_runs.filter(c => c.name === process.env.job);
-
- if(check.length == 0) {
- const head_sha = pull.head.sha;
- const { data: completed_at } = await github.rest.checks.create({
- owner: context.repo.owner,
- repo: context.repo.repo,
- head_sha: head_sha,
- name: process.env.job,
- status: 'completed',
- conclusion: process.env.conclusion,
- output: {
- title: "Package result for ok to test",
- summary: "https://github.com/" + process.env.repository + "/actions/runs/" + process.env.run_id
- }
- });
-
- return completed_at;
- } else {
- const { data: result } = await github.rest.checks.update({
- ...context.repo,
- check_run_id: check[0].id,
- status: 'completed',
- conclusion: process.env.conclusion,
- output: {
- title: "Package result for ok to test",
- summary: "https://github.com/" + process.env.repository + "/actions/runs/" + process.env.run_id
- }
- });
-
- return result;
- }
+ run: exit 1
\ No newline at end of file
diff --git a/.github/workflows/ok-to-test-2.yml b/.github/workflows/ok-to-test-2.yml
index 3e1a9a1786..07d26f21ed 100644
--- a/.github/workflows/ok-to-test-2.yml
+++ b/.github/workflows/ok-to-test-2.yml
@@ -141,7 +141,6 @@ jobs:
regex: "################# _Do Not Edit This Area_ #################.*?###################################################"
regexFlags: ims
token: ${{ secrets.GITHUB_TOKEN }}
- uses: peter-evans/create-or-update-comment@v3
# Call the workflow to run Cypress tests
perform-test: