chore(ci): Implement Wasm breaking mode

This commit is contained in:
강동윤 (Donny) 2024-07-18 11:39:08 +09:00
parent fb3eabe730
commit c69e0307a6
6 changed files with 15 additions and 0 deletions

View File

@ -9,5 +9,6 @@ export async function test(options: RunOptions) {
build: "build",
beforeBuild: "rustup target add wasm32-wasi",
test: ["test:swc"],
isWasm: true,
});
}

View File

@ -8,5 +8,6 @@ export async function test(options: RunOptions) {
branch: "main",
build: ["rustup target add wasm32-unknown-unknown", "build"],
test: ["test"],
isWasm: true,
});
}

View File

@ -25,6 +25,7 @@ export interface RunOptions {
* Passed to fnm
*/
nodeVerison?: string;
isWasm?: boolean
}
type Task = string | { script: string; args?: string[] } | (() => Promise<any>);

View File

@ -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,

View File

@ -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

View File

@ -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"