forked from vitejs/vite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vitejs:main' into fix-missing-serve-sourcemaps
- Loading branch information
Showing
550 changed files
with
12,356 additions
and
9,921 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
dist | ||
playground-temp | ||
temp | ||
|
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
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
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ env: | |
NODE_OPTIONS: --max-old-space-size=6144 | ||
# install playwright binary manually (because pnpm only runs install script once) | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" | ||
# Vitest auto retry on flaky segfault | ||
VITEST_SEGFAULT_RETRY: 3 | ||
|
||
on: | ||
push: | ||
|
@@ -17,6 +19,8 @@ on: | |
- perf/* | ||
- v1 | ||
- v2 | ||
- v2.* | ||
- v3.* | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
@@ -46,7 +50,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected].2 | ||
uses: pnpm/[email protected].4 | ||
|
||
- name: Set node version to ${{ matrix.node_version }} | ||
uses: actions/setup-node@v3 | ||
|
@@ -102,7 +106,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected].2 | ||
uses: pnpm/[email protected].4 | ||
|
||
- name: Set node version to 16 | ||
uses: actions/setup-node@v3 | ||
|
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: ecosystem-ci trigger | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
trigger: | ||
runs-on: ubuntu-latest | ||
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run') | ||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const user = context.payload.sender.login | ||
console.log(`Validate user: ${user}`) | ||
const allowedUsers = new Set([ | ||
'yyx990803', | ||
'patak-dev', | ||
'antfu', | ||
'sodatea', | ||
'Shinigami92', | ||
'aleclarson', | ||
'bluwy', | ||
'poyoho', | ||
'sapphi-red', | ||
'ygj6', | ||
'Niputi' | ||
]) | ||
if (allowedUsers.has(user)) { | ||
console.log('Allowed') | ||
await github.rest.reactions.createForIssueComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, | ||
content: '+1', | ||
}) | ||
} else { | ||
console.log('Not allowed') | ||
await github.rest.reactions.createForIssueComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, | ||
content: '-1', | ||
}) | ||
throw new Error('not allowed') | ||
} | ||
- uses: actions/github-script@v6 | ||
id: get-pr-data | ||
with: | ||
script: | | ||
console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`) | ||
const { data: pr } = await github.rest.pulls.get({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.issue.number | ||
}) | ||
return { | ||
num: context.issue.number, | ||
branchName: pr.head.ref, | ||
repo: pr.head.repo.full_name | ||
} | ||
- id: generate-token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }} | ||
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }} | ||
repository: "${{ github.repository_owner }}/vite-ecosystem-ci" | ||
- uses: actions/github-script@v6 | ||
id: trigger | ||
env: | ||
COMMENT: ${{ github.event.comment.body }} | ||
with: | ||
github-token: ${{ steps.generate-token.outputs.token }} | ||
result-encoding: string | ||
script: | | ||
const comment = process.env.COMMENT.trim() | ||
const prData = ${{ steps.get-pr-data.outputs.result }} | ||
const suite = comment.replace(/^\/ecosystem-ci run/, '').trim() | ||
await github.rest.actions.createWorkflowDispatch({ | ||
owner: context.repo.owner, | ||
repo: 'vite-ecosystem-ci', | ||
workflow_id: 'ecosystem-ci-from-pr.yml', | ||
ref: 'main', | ||
inputs: { | ||
prNumber: '' + prData.num, | ||
branchName: prData.branchName, | ||
repo: prData.repo, | ||
suite: suite === '' ? '-' : suite | ||
} | ||
}) |
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected].2 | ||
uses: pnpm/[email protected].4 | ||
|
||
- name: Set node version to 16.x | ||
uses: actions/setup-node@v3 | ||
|
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
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
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
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
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
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
Oops, something went wrong.