diff --git a/.github/swc-ecosystem-ci/tests/plugin-css-variable.ts b/.github/swc-ecosystem-ci/tests/plugin-css-variable.ts index 48be096c7ce5..602aa51916de 100644 --- a/.github/swc-ecosystem-ci/tests/plugin-css-variable.ts +++ b/.github/swc-ecosystem-ci/tests/plugin-css-variable.ts @@ -9,5 +9,6 @@ export async function test(options: RunOptions) { build: "build", beforeBuild: "rustup target add wasm32-wasi", test: ["test:swc"], + isWasm: true, }); } diff --git a/.github/swc-ecosystem-ci/tests/swc-plugin-vue-jsx.ts b/.github/swc-ecosystem-ci/tests/swc-plugin-vue-jsx.ts index ff0d26371b2e..e9e8b3da40eb 100644 --- a/.github/swc-ecosystem-ci/tests/swc-plugin-vue-jsx.ts +++ b/.github/swc-ecosystem-ci/tests/swc-plugin-vue-jsx.ts @@ -8,5 +8,6 @@ export async function test(options: RunOptions) { branch: "main", build: ["rustup target add wasm32-unknown-unknown", "build"], test: ["test"], + isWasm: true, }); } diff --git a/.github/swc-ecosystem-ci/types.d.ts b/.github/swc-ecosystem-ci/types.d.ts index b9dc8a2d39c8..75a1b28fef94 100644 --- a/.github/swc-ecosystem-ci/types.d.ts +++ b/.github/swc-ecosystem-ci/types.d.ts @@ -25,6 +25,7 @@ export interface RunOptions { * Passed to fnm */ nodeVerison?: string; + isWasm?: boolean } type Task = string | { script: string; args?: string[] } | (() => Promise); diff --git a/.github/swc-ecosystem-ci/utils.ts b/.github/swc-ecosystem-ci/utils.ts index 3cec1ccf72b4..68f649a58890 100644 --- a/.github/swc-ecosystem-ci/utils.ts +++ b/.github/swc-ecosystem-ci/utils.ts @@ -203,6 +203,10 @@ export async function runInRepo(options: RunOptions & RepoOptions) { options.branch = "main"; } + if (process.env.ALLOW_BREAKING_WASM && options.isWasm) { + return; + } + const { build, test, diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index 68e9e532a3bf..fa3b8385b4d5 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -24,6 +24,12 @@ on: required: true type: string + allowBreakingWasm: + description: "Allow wasm breakage" + required: false + type: boolean + default: false + mode: type: string description: "Passing is a regular proces, and ignored is about ignored tests" @@ -96,6 +102,7 @@ jobs: env: SWC_VERSION: ${{ inputs.version }} CI_MODE: ${{ inputs.mode }} + ALLOW_BREAKING_WASM: ${{ inputs.allowBreakingWasm || 'false' }} # - if: ${{ failure() && github.event.inputs.mode == 'passing' }} # name: Notify failure diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0933525ae0f8..e27d0b509d3f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -124,6 +124,7 @@ jobs: version: ${{ needs.determine-nightly-version.outputs.version }} mode: "passing" suites: '["_"]' + allowBreakingWasm: ${{ inputs.allowBreakingWasm || false }} publish-npm-stable: name: "Publish ${{ inputs.version || 'stable' }} to npm"