Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ jobs:
with:
version: "latest"
install-go: false

- name: Run Go tests
run: go test -v ./...
6 changes: 4 additions & 2 deletions pkg/agentfs/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ func TestLoadDockerFiles(t *testing.T) {
expectedFiles := []string{
"examples/node.Dockerfile",
"examples/node.dockerignore",
"examples/python.Dockerfile",
"examples/python.dockerignore",
"examples/python.pip.Dockerfile",
"examples/python.pip.dockerignore",
"examples/python.uv.Dockerfile",
"examples/python.uv.dockerignore",
}

for _, file := range expectedFiles {
Expand Down
6 changes: 6 additions & 0 deletions pkg/agentfs/sdk_version_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ func checkPackageInFile(filePath string, projectType ProjectType, pythonMinVersi

// parsePythonPackageVersion parses a Python package line and extracts the version
func parsePythonPackageVersion(line string) (string, bool) {
// Git URLs don't have traditional versions, so we treat them as "latest"
gitPattern := regexp.MustCompile(`(?i)^livekit-agents(?:\[[^\]]+\])?\s*@\s*git\+`)
if gitPattern.MatchString(line) {
return "latest", true
}

// match with optional extras and version specifiers
pattern := regexp.MustCompile(`(?i)^livekit-agents(?:\[[^\]]+\])?\s*([=~><!]+)?\s*([^#]+)?`)
matches := pattern.FindStringSubmatch(line)
Expand Down
18 changes: 18 additions & 0 deletions pkg/agentfs/sdk_version_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,24 @@ func TestParsePythonPackageVersion(t *testing.T) {
expectedOutput: "",
expectedFound: false,
},
{
name: "Git URL format",
input: "livekit-agents[openai,turn-detector,silero,cartesia,deepgram] @ git+https://github.com/livekit/agents.git@load-debug#subdirectory=livekit-agents",
expectedOutput: "latest",
expectedFound: true,
},
{
name: "Git URL format with extras",
input: "livekit-agents[voice] @ git+https://github.com/livekit/agents.git@main",
expectedOutput: "latest",
expectedFound: true,
},
{
name: "Git URL format simple",
input: "livekit-agents @ git+https://github.com/livekit/agents.git",
expectedOutput: "latest",
expectedFound: true,
},
}

for _, tt := range tests {
Expand Down
1 change: 1 addition & 0 deletions pkg/agentfs/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var (
".gitignore",
".git",
"node_modules",
".env",
".env.*",
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/loadtester/loadtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (t *LoadTest) Run(ctx context.Context) error {
formatBitrate(s.bytes, s.elapsed),
formatBitrate(s.bytes/int64(len(summaries)), s.elapsed),
)
summaryTable.Row("Total", fmt.Sprintf("%d/%d", s.tracks, s.expected), sBitrate, sDropped, string(s.errCount))
summaryTable.Row("Total", fmt.Sprintf("%d/%d", s.tracks, s.expected), sBitrate, sDropped, strconv.FormatInt(s.errCount, 10))
}
fmt.Println("\nSubscriber summaries:")
fmt.Println(summaryTable)
Expand Down
Loading