Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ jobs:
run: ./gradlew --stacktrace --no-problems-report native-lib:nodeTest
shell: bash

# Run the Node.js TCK conformance lane (only on master to save CI time on
# PRs — mirrors the native-cli regression gating). Stages the DataWeave
# test-suite corpus, then runs the tck vitest project against the built
# package. The Node package was already built by "Create Native Lib Node
# Package" above.
- name: Run Node.js TCK Conformance
if: github.ref == 'refs/heads/master'
run: |
./gradlew --stacktrace --no-problems-report native-lib:stageTckSuites
cd native-lib/node && npm run test:tck
shell: bash

# Upload the artifact file
- name: Upload generated script
uses: actions/upload-artifact@v4
Expand Down
36 changes: 36 additions & 0 deletions native-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,42 @@ tasks.register('stageNodeNativeLib', Copy) {
into("${projectDir}/node/native")
}

// --- Node.js TCK conformance suite staging ---
// Downloads the same DataWeave test-suite zips the CLI regression uses and
// unzips each into node/tests/tck/suites/<suite>/ for the Node `tck` vitest
// lane. Not wired into `nodeTest` (which runs on PRs) — invoked on demand and
// by the master-only TCK CI step, mirroring native-cli-integration-tests.
configurations {
weaveTckSuite
}

dependencies {
weaveTckSuite "org.mule.weave:runtime:${weaveTestSuiteVersion}:test@zip"
weaveTckSuite "org.mule.weave:core-modules:${weaveTestSuiteVersion}:test@zip"
}

def tckSuitesDir = "${projectDir}/node/tests/tck/suites"

tasks.register('cleanTckSuites', Delete) {
delete tckSuitesDir
}

tasks.register('stageTckSuites') {
dependsOn 'cleanTckSuites'
// Map each resolved artifact to a suite name (runtime, core-modules) taken
// from the artifact file name, and unzip into suites/<name>/.
doLast {
configurations.weaveTckSuite.resolvedConfiguration.resolvedArtifacts.each { artifact ->
def suiteName = artifact.name // e.g. "runtime", "core-modules"
copy {
from zipTree(artifact.file)
into "${tckSuitesDir}/${suiteName}"
}
println("Staged TCK suite '${suiteName}' -> ${tckSuitesDir}/${suiteName}")
}
}
}

tasks.register('buildNodePackage', Exec) {
dependsOn tasks.named('stageNodeNativeLib')
workingDir("${projectDir}/node")
Expand Down
1 change: 1 addition & 0 deletions native-lib/node/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dist/
build/
native/
coverage/
tests/tck/suites/
*.tgz
129 changes: 129 additions & 0 deletions native-lib/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion native-lib/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"node": ">=18"
},
"gypfile": true,
"dependencies": {},
"devDependencies": {
"@types/node": "^20",
"@vitest/coverage-v8": "^3.0",
"fast-xml-parser": "^5.10.1",
"node-gyp": "^10",
"typescript": "^5.5",
"vitest": "^3.0"
Expand Down
Loading
Loading