Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

test(cua-driver): align Hyprland release-contract tests with the rebuild_tag workflow (#6713)

cua-agents[bot]8e8dd248ba05
diff --git a/libs/cua-driver/hyprland-plugin/packaging/release/test_release.py b/libs/cua-driver/hyprland-plugin/packaging/release/test_release.py
index 62210e1a58..c82e7e5f93 100644
--- a/libs/cua-driver/hyprland-plugin/packaging/release/test_release.py
+++ b/libs/cua-driver/hyprland-plugin/packaging/release/test_release.py
@@ -183,7 +183,8 @@ class ReleaseTest(unittest.TestCase):
python.symlink_to(sys.executable)
return subprocess.run(["bash", "-e", "-c", script], cwd=self.repo,
env={**os.environ, "PATH": f"{binaries}:{os.environ['PATH']}",
- "GITHUB_REF": "refs/heads/main", "REQUESTED_VERSION": version,
+ "GITHUB_REF": "refs/heads/main", "RELEASE_REF": "refs/heads/main",
+ "REQUESTED_VERSION": version,
"GITHUB_OUTPUT": str(self.root / "step-output")},
capture_output=True, text=True)
diff --git a/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py b/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py
index 97513ca640..b35b4eb428 100644
--- a/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py
+++ b/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py
@@ -19,8 +19,8 @@ class WorkflowTest(unittest.TestCase):
self.assertIn("needs: release-attribution-preflight", self.job)
self.assertIn(
" if: >-\n"
- " github.event_name == 'push' &&\n"
- " startsWith(github.ref, 'refs/tags/cua-driver-rs-v')\n",
+ " ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')) || "
+ "(github.event_name == 'workflow_dispatch' && inputs.rebuild_tag != ''))\n",
self.job,
)
# The stable tag push is the only publishing run and always runs the
@@ -28,8 +28,8 @@ class WorkflowTest(unittest.TestCase):
needs, steps = self.release.split(" steps:\n", 1)
self.assertIn(" - build-hyprland-plugin-source\n", needs)
self.assertIn(
- "if: github.event_name == 'push' && "
- "startsWith(github.ref, 'refs/tags/cua-driver-rs-v')",
+ "if: ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')) || "
+ "(github.event_name == 'workflow_dispatch' && inputs.rebuild_tag != ''))",
needs,
)
self.assertNotIn("inputs.publish", self.workflow)
@@ -39,7 +39,7 @@ class WorkflowTest(unittest.TestCase):
def test_source_override_is_checked_and_assets_remain_namespaced(self):
self.assertIn("fetch-depth: 0", self.job)
- self.assertIn("ref: ${{ inputs.source_ref || github.ref }}", self.job)
+ self.assertIn("ref: ${{ inputs.rebuild_sha || inputs.source_ref || github.ref }}", self.job)
self.assertIn('--repo . --revision "$(git rev-parse HEAD)"', self.job)
self.assertIn('--driver-version "$VERSION" --release-assets', self.job)
self.assertIn("path: plugin-release-assets/*.tar.gz", self.job)