fix(ci): fix golangci-lint version, skip player test in CI, remove standalone frontend build
- Use specific golangci-lint version (v2.5.0) instead of 'v2' which the action cannot parse - Use --build-tags flag (v2 syntax) instead of -tags - Skip player test in CI: requires Wails runtime context and audio device which are unavailable in GitHub Actions - Remove standalone 'pnpm build' from frontend job since Vite cannot resolve Wails path aliases alone; the build-check job validates the full build via Wails
This commit is contained in:
@@ -75,8 +75,8 @@ jobs:
|
|||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v7
|
uses: golangci/golangci-lint-action@v7
|
||||||
with:
|
with:
|
||||||
version: v2
|
version: v2.5.0
|
||||||
args: --timeout 5m -tags webkit2_41
|
args: --timeout 5m --build-tags webkit2_41
|
||||||
|
|
||||||
- name: govulncheck
|
- name: govulncheck
|
||||||
uses: golang/govulncheck-action@v1
|
uses: golang/govulncheck-action@v1
|
||||||
@@ -137,10 +137,12 @@ jobs:
|
|||||||
echo "Generated code is up to date."
|
echo "Generated code is up to date."
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# Frontend: type-check and build
|
# Frontend: type-check
|
||||||
|
# (full build is verified by the build-check job
|
||||||
|
# via Wails which handles path resolution)
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
frontend:
|
frontend:
|
||||||
name: Frontend Build
|
name: Frontend Type Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -164,9 +166,6 @@ jobs:
|
|||||||
- name: Type check
|
- name: Type check
|
||||||
run: pnpm exec tsc --noEmit
|
run: pnpm exec tsc --noEmit
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# Build verification: ensure it compiles on all
|
# Build verification: ensure it compiles on all
|
||||||
# target platforms (no artifacts uploaded)
|
# target platforms (no artifacts uploaded)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package player
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,6 +14,12 @@ var testQueue = []string{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPlayer(t *testing.T) {
|
func TestPlayer(t *testing.T) {
|
||||||
|
// This test requires a Wails runtime context for event registration and
|
||||||
|
// an audio device for playback. Skip in CI where neither is available.
|
||||||
|
if os.Getenv("CI") != "" {
|
||||||
|
t.Skip("skipping: requires Wails runtime context and audio device")
|
||||||
|
}
|
||||||
|
|
||||||
t.Logf("Starting test")
|
t.Logf("Starting test")
|
||||||
|
|
||||||
p, err := NewPlayer(context.Background(), slog.Default(), nil)
|
p, err := NewPlayer(context.Background(), slog.Default(), nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user