Skip to content

Commit 9acaff4

Browse files
committed
🐛 fix(ci): resolve Linux CI drift with cross-platform path handling
- Replace hard-coded Windows path separators with filepath.Join() in tests - Pin golangci-lint to v2.10.1 in CI workflow - Align CI lint args with local command using ./... target
1 parent 04f3033 commit 9acaff4

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: golangci-lint
2929
uses: golangci/golangci-lint-action@v9
3030
with:
31-
version: latest
32-
args: --config .golangci.yml
31+
version: v2.10.1
32+
args: ./...
3333

3434
test:
3535
runs-on: ubuntu-latest

docs/go/maintainer/development-tracker.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ Immediate next tasks:
151151

152152
### 2026-03-17 Session Update
153153

154+
- Completed: Fixed Linux CI drift in unit tests and pinned the workflow lint toolchain to the same `golangci-lint` version used locally. The follow-import and readiness example-list tests now build expected fixture paths with `filepath.Join(...)` instead of hard-coding Windows separators, the duplicate follow-input test now uses a platform-neutral relative path, and `.github/workflows/build-release.yml` now pins `golangci-lint` to `v2.10.1` with the same `./...` target as the local command.
155+
- In progress: none.
156+
- Blockers: none.
157+
- Next step: keep CI green by committing the current cross-platform test fixes plus the pinned lint version, then resume the next operator-facing slice.
158+
159+
### 2026-03-17 Session Update
160+
154161
- Completed: Deduplicated the shared cleanup/audit hygiene option layer in `internal/app/import_follow.go`. `cleanup-follow-imports` and `audit-follow-imports` now embed one common option struct for shared paths, filters, retention profiles, fail-if-matched, and age-gating; they reuse the same common flag parser, retention-profile application, and pattern/age/target-binding validation while keeping command-specific prune/check flags separate. App tests now also cover audit-side invalid pattern and retention-profile parsing so both command families stay aligned under one helper path.
155162
- In progress: none.
156163
- Blockers: none.

internal/app/import_follow_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,8 @@ func TestListAuditFollowImportsExamples(t *testing.T) {
471471
}
472472
output := buffer.String()
473473
for _, fragment := range []string{
474-
"example=daily-audit-text path=testdata\\audit-follow-imports-daily-audit.txt format=text",
475-
"example=filtered-audit-json path=testdata\\audit-follow-imports-filtered-audit.json format=json",
474+
"example=daily-audit-text path=" + filepath.Join("testdata", "audit-follow-imports-daily-audit.txt") + " format=text",
475+
"example=filtered-audit-json path=" + filepath.Join("testdata", "audit-follow-imports-filtered-audit.json") + " format=json",
476476
"example_count=2",
477477
} {
478478
if !strings.Contains(output, fragment) {
@@ -548,8 +548,8 @@ func TestListCleanupFollowImportsExamples(t *testing.T) {
548548
}
549549
output := buffer.String()
550550
for _, fragment := range []string{
551-
"example=daily-dry-run-text path=testdata\\cleanup-follow-imports-daily-dry-run.txt format=text",
552-
"example=filtered-cleanup-json path=testdata\\cleanup-follow-imports-filtered-cleanup.json format=json",
551+
"example=daily-dry-run-text path=" + filepath.Join("testdata", "cleanup-follow-imports-daily-dry-run.txt") + " format=text",
552+
"example=filtered-cleanup-json path=" + filepath.Join("testdata", "cleanup-follow-imports-filtered-cleanup.json") + " format=json",
553553
"example_count=2",
554554
} {
555555
if !strings.Contains(output, fragment) {
@@ -1350,7 +1350,7 @@ func TestBuildFollowImportsInputsRejectsDuplicateInputs(t *testing.T) {
13501350
root := t.TempDir()
13511351
_, _, err := buildFollowImportsInputs(followImportsOptions{
13521352
Source: followImportsWatcherSource,
1353-
InputPaths: []string{"events.jsonl", ".\\events.jsonl"},
1353+
InputPaths: []string{"events.jsonl", filepath.Join(".", "events.jsonl")},
13541354
CWD: root,
13551355
})
13561356
if err == nil {

scripts/readiness-check/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,9 @@ func TestListReadinessExamples(t *testing.T) {
736736
}
737737
output := buffer.String()
738738
for _, fragment := range []string{
739-
"example=ci-json path=testdata\\example-ci-success.json format=json",
740-
"example=slow-ci-text path=testdata\\example-slow-ci-success.txt format=text",
741-
"example=release-warning-failure-text path=testdata\\example-release-warning-failure.txt format=text",
739+
"example=ci-json path=" + filepath.Join(readinessExampleDirName, "example-ci-success.json") + " format=json",
740+
"example=slow-ci-text path=" + filepath.Join(readinessExampleDirName, "example-slow-ci-success.txt") + " format=text",
741+
"example=release-warning-failure-text path=" + filepath.Join(readinessExampleDirName, "example-release-warning-failure.txt") + " format=text",
742742
"example_count=3",
743743
} {
744744
if !strings.Contains(output, fragment) {

0 commit comments

Comments
 (0)