Skip to content

Commit 7ffa99e

Browse files
wesmclaude
andcommitted
fix: replace tracked placeholder with CI stub for go:embed
The tracked placeholder.html in internal/web/dist/ was deleted by make build (which clears the dist directory). Instead, CI jobs that need Go compilation without a frontend build create a stub file in a workflow step. This avoids polluting the working tree. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent acff1f4 commit 7ffa99e

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
with:
2323
go-version-file: go.mod
2424

25+
- name: Stub frontend embed dir
26+
run: mkdir -p internal/web/dist && echo ok > internal/web/dist/stub.html
27+
2528
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
2629
with:
2730
version: v2.10.1
@@ -51,6 +54,9 @@ jobs:
5154
install: mingw-w64-x86_64-gcc
5255
path-type: inherit
5356

57+
- name: Stub frontend embed dir
58+
run: mkdir -p internal/web/dist && echo ok > internal/web/dist/stub.html
59+
5460
- name: Run Go tests
5561
run: go test -tags fts5 ./... -v -count=1
5662
env:
@@ -73,6 +79,9 @@ jobs:
7379
with:
7480
go-version-file: go.mod
7581

82+
- name: Stub frontend embed dir
83+
run: mkdir -p internal/web/dist && echo ok > internal/web/dist/stub.html
84+
7685
- name: Test with coverage
7786
run: go test -tags fts5 -race -coverprofile=coverage.out ./...
7887
env:

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ frontend/dist/
1010
frontend/test-results/
1111
frontend/playwright-report/
1212

13-
# Embedded frontend build output (keep placeholder for go:embed)
14-
internal/web/dist/*
15-
!internal/web/dist/placeholder.html
13+
# Embedded frontend build output
14+
internal/web/dist/
1615

1716
# Test/build artifacts
1817
/dist/

internal/web/dist/placeholder.html

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)