Compare commits

...
Author SHA1 Message Date
james.maesandCodex aefde33c34 fix(ci): verify frontend maintenance without publishing
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 17:25:30 -05:00
4 changed files with 44 additions and 2 deletions

No files matched your search

+4 -1
View File
@@ -342,7 +342,10 @@ def frontend_template(config, branch, tag):
kind = "release"
if kind != "test" and not config["publish"][kind]:
kind = "test"
if kind == "test" and proven_docs_only(config, branch, tag):
maintenance = proven_ci_maintenance(branch, tag)
if maintenance:
kind = "test"
if kind == "test" and not maintenance and proven_docs_only(config, branch, tag):
result = qbit_template(config, branch, tag)
result["workflows"]["test_only"]["jobs"][0]["docs_only"]["name"] = (
"qqq-orb/mvn_frontend_test_only" if material else "qqq-orb/node_test_only")
+4 -1
View File
@@ -342,7 +342,10 @@ def frontend_template(config, branch, tag):
kind = "release"
if kind != "test" and not config["publish"][kind]:
kind = "test"
if kind == "test" and proven_docs_only(config, branch, tag):
maintenance = proven_ci_maintenance(branch, tag)
if maintenance:
kind = "test"
if kind == "test" and not maintenance and proven_docs_only(config, branch, tag):
result = qbit_template(config, branch, tag)
result["workflows"]["test_only"]["jobs"][0]["docs_only"]["name"] = (
"qqq-orb/mvn_frontend_test_only" if material else "qqq-orb/node_test_only")
+21
View File
@@ -56,6 +56,27 @@ class MaintenanceTests(unittest.TestCase):
'/(develop|main|release/.*|hotfix/.*|integration.*)/'])
self.assertNotIn('branch_type', job)
def test_frontend_maintenance_verifies_without_publishing(self):
for profile, prefix in (('frontend-core', 'node_'), ('frontend-material', 'mvn_frontend_')):
manifest = {'profile': profile, 'orb_version': '0.8', 'default_branch': 'develop'}
with mock.patch.object(Path, 'read_text', return_value=yaml.safe_dump(manifest)):
config = pipeline.load_manifest('unused', '0.8')
for branch in ('main', 'develop', 'release/1.0', 'hotfix/1.0.1'):
with self.subTest(profile=profile, branch=branch), mock.patch.object(pipeline, 'git', side_effect=self.git_result):
result = pipeline.frontend_template(config, branch, '')
job = result['workflows']['test_only']['jobs'][0]['qqq-orb/' + prefix + 'test_only']
self.assertNotIn('branch_type', job)
self.assertEqual(job['filters']['branches'], {'ignore': 'automation/qbit-rc-pending'})
self.paths = b'package.json\0'
with mock.patch.object(pipeline, 'git', side_effect=self.git_result):
result = pipeline.frontend_template(config, 'develop', '')
self.assertIn('qqq-orb/' + prefix + 'publish', result['workflows']['publish_snapshot']['jobs'][0])
self.paths = b'.qqq-ci.yml\0'
with mock.patch.object(pipeline, 'git', return_value=b'verified-head\n'):
result = pipeline.frontend_template(config, 'main', 'v1.2.3')
job = result['workflows']['publish_release']['jobs'][0]['qqq-orb/' + prefix + 'publish']
self.assertEqual(job['branch_type'], 'release')
def test_application_changes_and_unknown_files_publish_normally(self):
for paths in (b'pom.xml\0', b'.qqq-ci.yml\0src/Main.java\0', b'.github/workflows/custom-release.yml\0', b'', None):
self.paths = paths
+15
View File
@@ -623,6 +623,21 @@ class PipelineTests(unittest.TestCase):
if PACKED:
self.assertEqual(result, self.render(packed=True, CIRCLE_BRANCH="main"))
def test_frontend_ci_only_commits_verify_with_packed_parity(self):
for profile, job_name in (("frontend-core", "qqq-orb/node_test_only"),
("frontend-material", "qqq-orb/mvn_frontend_test_only")):
self.write_manifest(profile=profile)
self.git("add", ".qqq-ci.yml")
self.git("-c", "commit.gpgsign=false", "commit", "-qm", "ci: adopt managed orb")
for branch in ("main", "develop"):
with self.subTest(profile=profile, branch=branch):
result = self.render(CIRCLE_BRANCH=branch)
job = result["workflows"]["verify"]["jobs"][0][job_name]
self.assertNotIn("branch_type", job)
self.assertEqual(job["filters"]["branches"], {"ignore": "automation/qbit-rc-pending"})
if PACKED:
self.assertEqual(result, self.render(packed=True, CIRCLE_BRANCH=branch))
def test_nonpublishing_main_ci_change_runs_verification_with_packed_parity(self):
self.write_manifest(default_branch="main", release_on_main=False,
test_branch_policy="feature")