diff --git a/.github/workflows/ecosystem-ci-from-pr.yml b/.github/workflows/ecosystem-ci-from-pr.yml index 1eb5732..94f5c0a 100644 --- a/.github/workflows/ecosystem-ci-from-pr.yml +++ b/.github/workflows/ecosystem-ci-from-pr.yml @@ -34,6 +34,21 @@ on: - rspress - rsbuild - compat + modernRef: + description: "modern.js branch name to use" + required: true + type: string + default: "main" + rspressRef: + description: "rspress branch name to use" + required: true + type: string + default: "main" + rsbuildRef: + description: "rsbuild branch name to use" + required: true + type: string + default: "main" jobs: init: runs-on: ubuntu-latest @@ -78,6 +93,10 @@ jobs: --branch ${{ inputs.branchName }} --repo ${{ inputs.repo }} ${{ inputs.suite }} + env: + MODERN_REF: ${{ inputs.modernRef }} + RSPRESS_REF: ${{ inputs.rspressRef }} + RSBUILD_REF: ${{ inputs.rsbuildRef }} execute-all: runs-on: ubuntu-latest @@ -109,6 +128,10 @@ jobs: --branch ${{ inputs.branchName }} --repo ${{ inputs.repo }} ${{ matrix.suite }} + env: + MODERN_REF: ${{ inputs.modernRef }} + RSPRESS_REF: ${{ inputs.rspressRef }} + RSBUILD_REF: ${{ inputs.rsbuildRef }} update-comment: runs-on: ubuntu-latest diff --git a/.github/workflows/ecosystem-ci-selected.yml b/.github/workflows/ecosystem-ci-selected.yml index baaa3d3..32e0f2d 100644 --- a/.github/workflows/ecosystem-ci-selected.yml +++ b/.github/workflows/ecosystem-ci-selected.yml @@ -40,6 +40,21 @@ on: - rspress - rsbuild - compat + modernRef: + description: "modern.js branch name to use" + required: true + type: string + default: "main" + rspressRef: + description: "rspress branch name to use" + required: true + type: string + default: "main" + rsbuildRef: + description: "rsbuild branch name to use" + required: true + type: string + default: "main" jobs: execute-selected-suite: @@ -62,6 +77,10 @@ jobs: --${{ inputs.refType }} ${{ inputs.ref }} --repo ${{ inputs.repo }} ${{ inputs.suite }} + env: + MODERN_REF: ${{ inputs.modernRef }} + RSPRESS_REF: ${{ inputs.rspressRef }} + RSBUILD_REF: ${{ inputs.rsbuildRef }} - if: always() run: pnpm tsx discord-webhook.ts env: diff --git a/tests/modernjs.ts b/tests/modernjs.ts index d2e3415..20779d7 100644 --- a/tests/modernjs.ts +++ b/tests/modernjs.ts @@ -5,7 +5,7 @@ export async function test(options: RunOptions) { await runInRepo({ ...options, repo: 'web-infra-dev/modern.js', - branch: 'main', + branch: process.env.MODERN_REF ?? 'main', beforeTest: async () => { cd('tests/e2e/builder') await $`pnpm playwright install chromium` diff --git a/tests/rsbuild.ts b/tests/rsbuild.ts index ced0c99..eda0372 100644 --- a/tests/rsbuild.ts +++ b/tests/rsbuild.ts @@ -5,7 +5,7 @@ export async function test(options: RunOptions) { await runInRepo({ ...options, repo: 'web-infra-dev/rsbuild', - branch: 'main', + branch: process.env.RSBUILD_REF ?? 'main', beforeTest: async () => { cd('./e2e') await $`pnpm playwright install` diff --git a/tests/rspress.ts b/tests/rspress.ts index a376745..b93a902 100644 --- a/tests/rspress.ts +++ b/tests/rspress.ts @@ -5,7 +5,7 @@ export async function test(options: RunOptions) { await runInRepo({ ...options, repo: 'web-infra-dev/rspress', - branch: 'main', + branch: process.env.RSPRESS_REF ?? 'main', beforeTest: async () => { await $`pnpm playwright install` },