Skip to content

Commit

Permalink
updated CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalmahajan15 committed Apr 25, 2024
1 parent 806913c commit c286433
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/golden-test-no-grouping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golden-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c286433

Please sign in to comment.