From c2864331ecb2278140a18a42e0ddb409039393fa Mon Sep 17 00:00:00 2001
From: sonalmahajan15 <smahajan@uber.com>
Date: Thu, 25 Apr 2024 15:16:42 -0700
Subject: [PATCH] updated CI job

---
 .github/workflows/golden-test-no-grouping.yml | 10 +++++-----
 .github/workflows/golden-test.yml             |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/golden-test-no-grouping.yml b/.github/workflows/golden-test-no-grouping.yml
index a6451db8..7c0713ed 100644
--- a/.github/workflows/golden-test-no-grouping.yml
+++ b/.github/workflows/golden-test-no-grouping.yml
@@ -24,13 +24,13 @@ jobs:
           go-version: 1.22.x
           cache: false
 
-      - name: Golden Test
-        id: golden_test
+      - name: Golden Test w/o grouping
+        id: golden_test_no_grouping
         # Run golden test by comparing HEAD and the base branch (the target branch of the PR).
         # GitHub Actions terminates the job if it hits the resource limits. Here we limit the
         # memory usage to 8GiB to avoid that.
         run: |
-          make golden-test GOMEMLIMIT=8192MiB ARGS="-base-branch ${{ github.event.pull_request.base.ref }} -result-file ${{ runner.temp }}/golden-test-result.md -group-error-messages=false"
+          make golden-test GOMEMLIMIT=8192MiB ARGS="-base-branch ${{ github.event.pull_request.base.ref }} -result-file ${{ runner.temp }}/golden-test-no-grouping-result.md -group-error-messages=false"
 
       - uses: actions/github-script@v7
         with:
@@ -40,7 +40,7 @@ jobs:
             const issueNumber = context.issue.number;
             const owner = context.repo.owner;
             const repo = context.repo.repo;
-            const rawData = await fsp.readFile(`${{ runner.temp }}/golden-test-result.md`, 'utf8');
+            const rawData = await fsp.readFile(`${{ runner.temp }}/golden-test-no-grouping-result.md`, 'utf8');
             
             // GitHub API has a limit of 65536 bytes for a comment body, so here we shrink the 
             // diff part (anything between <details> and </details>) to 10,000 characters if it
@@ -61,7 +61,7 @@ jobs:
               repo: repo,
               issue_number: issueNumber
             });
-            const botComment = comments.data.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.startsWith('## Golden Test'));
+            const botComment = comments.data.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.startsWith('## Golden Test') && comment.body.endsWith('w/o grouping'));
             
             // Update or create the PR comment.
             if (botComment) {
diff --git a/.github/workflows/golden-test.yml b/.github/workflows/golden-test.yml
index e7ace837..ad1bfe9b 100644
--- a/.github/workflows/golden-test.yml
+++ b/.github/workflows/golden-test.yml
@@ -24,7 +24,7 @@ jobs:
           go-version: 1.22.x
           cache: false
 
-      - name: Golden Test
+      - name: Golden Test w/ grouping
         id: golden_test
         # Run golden test by comparing HEAD and the base branch (the target branch of the PR).
         # GitHub Actions terminates the job if it hits the resource limits. Here we limit the
@@ -61,7 +61,7 @@ jobs:
               repo: repo,
               issue_number: issueNumber
             });
-            const botComment = comments.data.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.startsWith('## Golden Test'));
+            const botComment = comments.data.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.startsWith('## Golden Test') && comment.body.endsWith('w/ grouping'));
             
             // Update or create the PR comment.
             if (botComment) {