Skip to content

BUILD: Test the examples against the packages on Maven Central - #310

Draft
jwrosewell wants to merge 2 commits into
mainfrom
ci/examples-published-main
Draft

jwrosewell wants to merge 2 commits into
mainfrom
ci/examples-published-main

Conversation

@jwrosewell

Copy link
Copy Markdown
Contributor

A new workflow, Examples vs Published Packages, runs the tests of both examples trees against what is on Maven Central, as python's does against PyPI. It runs by hand, after Publish and the Nightly Pipeline, and on a pull request that changes it.

ci/run-published-examples.ps1 does the work. It pins device-detection, ip-intelligence, pipeline.cloudrequestengine and pipeline.jsonbuilder to the version given, or to the version a publish tagged once Maven Central lists it, or else to the latest release. Maven starts from an empty local repository, and every pinned package has to have come from Maven Central. A run fails if a tree runs no tests or any test fails. It also fails if a test skips, except three that skip here by design: the two key lookup tests that need no key set, and the Human Confidence test that asks the staging cloud.

$ExampleVersionProperties moves from release.ps1 to packages.ps1, so the script does not need common-ci. The names check allows GITHUB_STEP_SUMMARY and CACHE_ENCRYPTION_KEY, which the workflow and the script read. The version typed for a run by hand reaches the script through _51DEGREES_PACKAGE_VERSION, the name python's workflow gives it, not written into it, and the workflow keys test allows that one name to come from the input.

This publishes no package. It changes only .github/workflows and ci/, and every package in ci/packages.json is under device-detection, ip-intelligence, location or pipeline.

A new workflow, Examples vs Published Packages, runs the tests of both examples trees against what is on Maven Central, as python's does against PyPI. It runs by hand, after Publish and the Nightly Pipeline, and on a pull request that changes it.

ci/run-published-examples.ps1 does the work. It pins device-detection, ip-intelligence, pipeline.cloudrequestengine and pipeline.jsonbuilder to the version given, or to the version a publish tagged once Maven Central lists it, or else to the latest release. Maven starts from an empty local repository, and every pinned package has to have come from Maven Central. A run fails if a tree runs no tests or any test fails. It also fails if a test skips, except three that skip here by design: the two key lookup tests that need no key set, and the Human Confidence test that asks the staging cloud.

$ExampleVersionProperties moves from release.ps1 to packages.ps1, so the script does not need common-ci. The names check allows GITHUB_STEP_SUMMARY and CACHE_ENCRYPTION_KEY, which the workflow and the script read. The version typed for a run by hand reaches the script through _51DEGREES_PACKAGE_VERSION, the name python's workflow gives it, not written into it, and the workflow keys test allows that one name to come from the input.
Examples vs Published Packages failed on #309 and #310 when HumanConfidenceLiveTest.basicKeysPassiveAnswerCarriesNoSource skipped with "CLOUD_STAGING_ENDPOINT is not set". The script's list of expected skips named only the other test that asks the staging cloud. Staging goes only to the Cloud Human Confidence workflow, so every test that asks it skips here. A skip whose reason names CLOUD_STAGING_ENDPOINT or RESOURCE_KEY_BESPOKE_STAGING is now expected, whichever test it is, and the two KeyHelper tests stay listed by name.

The Pester test of the tags also failed on the runners, because git refused to make the annotated tag with no identity set. The test repository now has one, as it already had for its commit.
jwrosewell pushed a commit that referenced this pull request Dec 6, 2026
Examples vs Published Packages failed on #309 and #310 when HumanConfidenceLiveTest.basicKeysPassiveAnswerCarriesNoSource skipped with "CLOUD_STAGING_ENDPOINT is not set". The script's list of expected skips named only the other test that asks the staging cloud. Staging goes only to the Cloud Human Confidence workflow, so every test that asks it skips here. A skip whose reason names CLOUD_STAGING_ENDPOINT or RESOURCE_KEY_BESPOKE_STAGING is now expected, whichever test it is, and the two KeyHelper tests stay listed by name.

The Pester test of the tags also failed on the runners, because git refused to make the annotated tag with no identity set. The test repository now has one, as it already had for its commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants