mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 07:02:28 +03:00
chore(ci): Implement Wasm breaking mode
This commit is contained in:
parent
fb3eabe730
commit
c69e0307a6
@ -9,5 +9,6 @@ export async function test(options: RunOptions) {
|
||||
build: "build",
|
||||
beforeBuild: "rustup target add wasm32-wasi",
|
||||
test: ["test:swc"],
|
||||
isWasm: true,
|
||||
});
|
||||
}
|
||||
|
@ -8,5 +8,6 @@ export async function test(options: RunOptions) {
|
||||
branch: "main",
|
||||
build: ["rustup target add wasm32-unknown-unknown", "build"],
|
||||
test: ["test"],
|
||||
isWasm: true,
|
||||
});
|
||||
}
|
||||
|
1
.github/swc-ecosystem-ci/types.d.ts
vendored
1
.github/swc-ecosystem-ci/types.d.ts
vendored
@ -25,6 +25,7 @@ export interface RunOptions {
|
||||
* Passed to fnm
|
||||
*/
|
||||
nodeVerison?: string;
|
||||
isWasm?: boolean
|
||||
}
|
||||
|
||||
type Task = string | { script: string; args?: string[] } | (() => Promise<any>);
|
||||
|
4
.github/swc-ecosystem-ci/utils.ts
vendored
4
.github/swc-ecosystem-ci/utils.ts
vendored
@ -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,
|
||||
|
7
.github/workflows/ecosystem-ci.yml
vendored
7
.github/workflows/ecosystem-ci.yml
vendored
@ -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
|
||||
|
1
.github/workflows/publish.yml
vendored
1
.github/workflows/publish.yml
vendored
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user