From 6adc3075128c3aa0ec02fb39ad49ab84591fb87f Mon Sep 17 00:00:00 2001 From: mlischetti Date: Thu, 3 Sep 2026 14:25:31 -0300 Subject: [PATCH 1/3] Fix release asset selection --- .github/actions/cli/action.yml | 2 +- .github/actions/python/action.yml | 2 +- .github/workflows/release.yml | 28 +++++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/actions/cli/action.yml b/.github/actions/cli/action.yml index b8565bf2..eb7601f8 100644 --- a/.github/actions/cli/action.yml +++ b/.github/actions/cli/action.yml @@ -51,4 +51,4 @@ runs: with: name: cli-${{ inputs.native-version }}-${{ inputs.script-name }}-${{ inputs.arch }} path: native-cli/build/distributions/dw-cli-${{ inputs.native-version }}-${{ inputs.script-name }}-${{ inputs.arch }}.zip - archive: false + if-no-files-found: error diff --git a/.github/actions/python/action.yml b/.github/actions/python/action.yml index 73d4b7d6..9246d9ae 100644 --- a/.github/actions/python/action.yml +++ b/.github/actions/python/action.yml @@ -54,7 +54,7 @@ runs: with: name: python-wheel-${{ inputs.native-version }}-${{ inputs.platform }} path: native-lib/python/dist/dataweave_native-0.0.1-py3-*.whl - archive: false + if-no-files-found: error - name: Run Python TCK Conformance if: always() && inputs.run-tck == 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f5583ca..1fb79407 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,8 +118,34 @@ jobs: fi mv "$source" "release-assets/dwlib-${VERSION}-${platform}.${extension}" done + mapfile -d '' assets < <(find release-assets -type f -name '*.zip' -print0) + if [ "${#assets[@]}" -ne 3 ]; then + echo "expected three CLI archives, found ${#assets[@]}" + exit 1 + fi + mapfile -d '' -O "${#assets[@]}" assets < <(find release-assets -type f -name '*.whl' -print0) + if [ "${#assets[@]}" -ne 6 ]; then + echo "expected three Python wheels" + exit 1 + fi + mapfile -d '' -O "${#assets[@]}" assets < <(find release-assets -type f -name '*.tgz' -print0) + if [ "${#assets[@]}" -ne 10 ]; then + echo "expected four Node packages" + exit 1 + fi + assets+=( + "release-assets/dwlib-${VERSION}-linux-x86_64.so" + "release-assets/dwlib-${VERSION}-windows-x86_64.dll" + "release-assets/dwlib-${VERSION}-macos-arm64.dylib" + "release-assets/dwlib-${VERSION}.h" + ) + for asset in "${assets[@]}"; do + if [ ! -f "$asset" ]; then + echo "release asset is missing: $asset" + exit 1 + fi + done gh release view "$TAG" || gh release create "$TAG" --generate-notes - mapfile -d '' assets < <(find release-assets -type f -print0) if [ "${#assets[@]}" -eq 0 ]; then echo "release artifacts are missing" exit 1 From 5165ebcfcf761ad2c1f2626a6a1d3cfb36f33e47 Mon Sep 17 00:00:00 2001 From: mlischetti Date: Thu, 3 Sep 2026 15:28:08 -0300 Subject: [PATCH 2/3] Preserve release archive artifacts --- .github/actions/cli/action.yml | 1 + .github/actions/python/action.yml | 1 + .github/workflows/release.yml | 23 ++++++++++++++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/actions/cli/action.yml b/.github/actions/cli/action.yml index eb7601f8..ff57a65d 100644 --- a/.github/actions/cli/action.yml +++ b/.github/actions/cli/action.yml @@ -51,4 +51,5 @@ runs: with: name: cli-${{ inputs.native-version }}-${{ inputs.script-name }}-${{ inputs.arch }} path: native-cli/build/distributions/dw-cli-${{ inputs.native-version }}-${{ inputs.script-name }}-${{ inputs.arch }}.zip + archive: false if-no-files-found: error diff --git a/.github/actions/python/action.yml b/.github/actions/python/action.yml index 9246d9ae..4a99d3cd 100644 --- a/.github/actions/python/action.yml +++ b/.github/actions/python/action.yml @@ -54,6 +54,7 @@ runs: with: name: python-wheel-${{ inputs.native-version }}-${{ inputs.platform }} path: native-lib/python/dist/dataweave_native-0.0.1-py3-*.whl + archive: false if-no-files-found: error - name: Run Python TCK Conformance diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fb79407..e808164d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,10 +85,31 @@ jobs: permissions: contents: write steps: - - name: Download release artifacts + - name: Download CLI archives uses: actions/download-artifact@v8 with: path: release-assets + pattern: dw-cli-* + merge-multiple: true + skip-decompress: true + - name: Download Python wheels + uses: actions/download-artifact@v8 + with: + path: release-assets + pattern: dataweave_native-*.whl + merge-multiple: true + skip-decompress: true + - name: Download Node packages + uses: actions/download-artifact@v8 + with: + path: release-assets + pattern: dataweave-native-*.tgz + merge-multiple: true + - name: Download native libraries + uses: actions/download-artifact@v8 + with: + path: release-assets + pattern: dwlib-* - name: Create release and upload assets env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 601c8824e50c39482e852347491c66a9a8b79269 Mon Sep 17 00:00:00 2001 From: mlischetti Date: Thu, 3 Sep 2026 16:16:46 -0300 Subject: [PATCH 3/3] Remove Python TCK report upload --- .github/actions/python/action.yml | 8 -------- native-lib/build.gradle | 3 +-- native-lib/python/tests/unit/test_ci_structure.py | 5 +---- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/actions/python/action.yml b/.github/actions/python/action.yml index 4a99d3cd..f008fe4e 100644 --- a/.github/actions/python/action.yml +++ b/.github/actions/python/action.yml @@ -61,11 +61,3 @@ runs: if: always() && inputs.run-tck == 'true' run: ./gradlew --stacktrace --no-problems-report native-lib:pythonTck shell: bash - - - name: Upload Python TCK JUnit - if: always() && inputs.run-tck == 'true' - uses: actions/upload-artifact@v7.0.1 - with: - name: python-tck-junit-${{ inputs.platform }} - path: native-lib/build/test-results/pythonTck.xml - if-no-files-found: error diff --git a/native-lib/build.gradle b/native-lib/build.gradle index d5a27e85..88bbf394 100644 --- a/native-lib/build.gradle +++ b/native-lib/build.gradle @@ -246,8 +246,7 @@ tasks.register('pythonTck', Exec) { inputs.dir("${projectDir}/python/tests/tck") inputs.dir(tckSuitesDir) inputs.file("${projectDir}/python/pytest.ini") - commandLine(pythonExe, '-m', 'pytest', '-m', 'tck', - '--junitxml', "${layout.buildDirectory.get().asFile}/test-results/pythonTck.xml") + commandLine(pythonExe, '-m', 'pytest', '-m', 'tck') } tasks.register('buildNodePackage', Exec) { diff --git a/native-lib/python/tests/unit/test_ci_structure.py b/native-lib/python/tests/unit/test_ci_structure.py index 7d6eacab..ba1d32fc 100644 --- a/native-lib/python/tests/unit/test_ci_structure.py +++ b/native-lib/python/tests/unit/test_ci_structure.py @@ -56,7 +56,7 @@ def test_python_tck_is_gated_by_the_master_only_workflow_input(): @pytest.mark.unit -def test_python_artifact_owns_test_dependencies_and_tck_junit_upload(): +def test_python_artifact_owns_test_dependencies(): root = Path(__file__).resolve().parents[4] foundation = (root / ".github/actions/build-foundation/action.yml").read_text() action = (root / ".github/actions/python/action.yml").read_text() @@ -64,14 +64,11 @@ def test_python_artifact_owns_test_dependencies_and_tck_junit_upload(): assert "Install Python test dependencies" not in foundation assert "native-lib/python[test]" in action assert "platform:" in action - assert "python-tck-junit-${{ inputs.platform }}" in action assert action.index("Create Native Lib Python Wheel") < action.index("Run Python TCK Conformance") assert action.index("Upload Python wheel (artifact)") < action.index("Run Python TCK Conformance") assert "Upload Python wheel to release" not in action assert "svenstaro/upload-release-action" not in action - assert action.index("Run Python TCK Conformance") < action.index("Upload Python TCK JUnit") assert named_step_if(action, "Run Python TCK Conformance") == "always() && inputs.run-tck == 'true'" - assert "native-lib/build/test-results/pythonTck.xml" in action @pytest.mark.unit