Skip to content

test: point native change-detection test at split workflows - #3

Merged
HermesYP merged 1 commit into
mainfrom
ci/fix-native-change-detection-test
Sep 12, 2026
Merged

HermesYP merged 1 commit into
mainfrom
ci/fix-native-change-detection-test

Conversation

@HermesYP

Copy link
Copy Markdown
Owner

Fixes the test failure exposed by #2.

Problem

tests/ci-native-change-detection.test.ts hardcodes a path to the workflow file that #2 deleted:

Error: ENOENT: no such file or directory, open '.../.github/workflows/ci.yml'
    at tests/ci-native-change-detection.test.ts:8:18

This surfaced as a Frontend check failure on #2 (the Test step: 101 tests, 1 fail). #2 was merged before that signal was acted on, so main currently has a failing frontend check — this PR restores it to green.

The coupling was invisible until the file was removed: the test reads the workflow as a text fixture and asserts on its contents, so deleting the workflow broke a test rather than a workflow.

Change

The test now reads the two split workflows instead of the one deleted file.

Assertion Before After
src-tauri and harbor-core are watched pathspecs parsed ci.yml parsed native-quality.yml
Both checks diff from the merge-base parent counted 2 matches in ci.yml counts 2 matches across frontend-quality.yml + native-quality.yml

Both assertions are preserved unchanged in intent; only their input files moved. The second test concatenates both workflows, so it still requires exactly two BASE_SHA="${GITHUB_SHA}^1" selections — it now genuinely verifies both workflows rather than one file containing both jobs.

Verification

The extraction regex is the subtle part, since the detection block contains a multi-line git diff continuation that does not end in \. I reproduced the test logic locally against the delivered workflow files:

extracted pathspecs: ["src-tauri","harbor-core"]
BASE_SHA pull_request selections: 2 (expected 2)
PASS  src-tauri watched
PASS  harbor-core watched
PASS  BASE_SHA selection count == 2

The Native check on this PR will self-skip as expected, because the change-detection step watches src-tauri, harbor-core, and native-quality.yml — not tests/.

@HermesYP
HermesYP merged commit bde232c into main Sep 12, 2026
2 checks passed
@HermesYP
HermesYP deleted the ci/fix-native-change-detection-test branch September 12, 2026 05:50
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.

1 participant