MCPcopy Create free account
hub / github.com/github/gh-aw / TestConvertToRemoteActionRef

Function TestConvertToRemoteActionRef

pkg/workflow/action_reference_test.go:12–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestConvertToRemoteActionRef(t *testing.T) {
13 tests := []struct {
14 name string
15 version string
16 actionTag string
17 setEmptyTag bool
18 localPath string
19 nilData bool
20 expectedRef string
21 shouldBeEmpty bool
22 }{
23 {
24 name: "local path with ./ prefix and version tag",
25 version: "v1.2.3",
26 localPath: "./actions/create-issue",
27 expectedRef: "github/gh-aw/actions/create-issue@v1.2.3",
28 },
29 {
30 name: "local path without ./ prefix and version tag",
31 version: "v1.0.0",
32 localPath: "actions/create-issue",
33 expectedRef: "github/gh-aw/actions/create-issue@v1.0.0",
34 },
35 {
36 name: "nested action path with version tag",
37 version: "v2.0.0",
38 localPath: "./actions/nested/action",
39 expectedRef: "github/gh-aw/actions/nested/action@v2.0.0",
40 },
41 {
42 name: "dev version returns empty",
43 version: "dev",
44 localPath: "./actions/create-issue",
45 shouldBeEmpty: true,
46 },
47 {
48 name: "empty version returns empty",
49 version: "",
50 localPath: "./actions/create-issue",
51 shouldBeEmpty: true,
52 },
53 {
54 name: "action-tag overrides version",
55 version: "v1.0.0",
56 actionTag: "latest",
57 localPath: "./actions/create-issue",
58 expectedRef: "github/gh-aw/actions/create-issue@latest",
59 },
60 {
61 name: "action-tag with specific SHA",
62 version: "v1.0.0",
63 actionTag: "abc123def456",
64 localPath: "./actions/setup",
65 expectedRef: "github/gh-aw/actions/setup@abc123def456",
66 },
67 {
68 name: "action-tag with version tag format",
69 version: "v1.0.0",

Callers

nothing calls this directly

Calls 4

NewCompilerFunction · 0.85
WithVersionFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected