-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): extend
/test
command functionality for PR testing (#17154)
* feat(ci): extend `/test` command functionality for PR testing * fix: optimize PR testing workflow ---------
- Loading branch information
Showing
1 changed file
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,12 +42,31 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
permissions: | ||
issues: write | ||
attestations: write | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: Fetch PR data (for PR) | ||
if: github.event.issue.pull_request | ||
uses: octokit/[email protected] | ||
id: pr-data | ||
with: | ||
route: GET /repos/{repo}/pulls/{number} | ||
repo: ${{ github.repository }} | ||
number: ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
if: ${{ !github.event.issue.pull_request }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout PR | ||
if: github.event.issue.pull_request | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ fromJson(steps.pr-data.outputs.data).head.ref }} | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
|
@@ -105,7 +124,7 @@ jobs: | |
await test({ github, context, core }, link, routes, number) | ||
- name: Print logs | ||
if: (env.TEST_CONTINUE) | ||
if: env.TEST_CONTINUE | ||
run: cat ${{ github.workspace }}/logs/combined.log | ||
|
||
- name: Upload Artifact | ||
|