Skip to content

Commit f69849f

Browse files
authored
fix(ci): skip _test.go files in semantic analysis
sfw's single-file loader can't load a test file in isolation; skip _test.go in the diff loop.
1 parent a257044 commit f69849f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/semantic_analysis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ jobs:
144144
145145
if [[ "$NEW_FILE_REF" != *.go ]] && [[ "$OLD_FILE_REF" != *.go ]]; then continue; fi
146146
147+
# Skip test files. sfw's single-file loader can't form a package from a
148+
# _test.go in isolation (it fails with "input packages list is empty"),
149+
# and test changes don't alter the production semantics this check guards.
150+
if [[ "$NEW_FILE_REF" == *_test.go ]] || [[ "$OLD_FILE_REF" == *_test.go ]]; then continue; fi
151+
147152
if [ -f "$NEW_FILE_REF" ]; then
148153
NEW_FILE="$NEW_FILE_REF"
149154
else

0 commit comments

Comments
 (0)