File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ const DefaultGitHubMCPServerVersion = "v0.20.2"
2929// DefaultFirewallVersion is the default version of the gh-aw-firewall (AWF) binary
3030const DefaultFirewallVersion = "v0.1.1"
3131
32+ // DefaultBunVersion is the default version of Bun for runtime setup
33+ const DefaultBunVersion = "1.1"
34+
3235// DefaultNodeVersion is the default version of Node.js for runtime setup
3336const DefaultNodeVersion = "24"
3437
Original file line number Diff line number Diff line change @@ -376,9 +376,9 @@ func TestApplyActionPinToStep(t *testing.T) {
376376func TestGetActionPinsSorting (t * testing.T ) {
377377 pins := getActionPins ()
378378
379- // Verify we got all the pins (should be 16 )
380- if len (pins ) != 16 {
381- t .Errorf ("getActionPins() returned %d pins, expected 16 " , len (pins ))
379+ // Verify we got all the pins (should be 17 )
380+ if len (pins ) != 17 {
381+ t .Errorf ("getActionPins() returned %d pins, expected 17 " , len (pins ))
382382 }
383383
384384 // Verify they are sorted by version (descending) then by repository name (ascending)
Original file line number Diff line number Diff line change 77 "version" : " v8" ,
88 "sha" : " ed597411d8f924073f98dfc5c65a23a2325f34cd"
99 },
10+ "oven-sh/setup-bun" : {
11+ "repo" : " oven-sh/setup-bun" ,
12+ "version" : " v2" ,
13+ "sha" : " 735343b667d3e6f658f44d0eca948eb6282f2b76"
14+ },
1015 "actions/checkout" : {
1116 "repo" : " actions/checkout" ,
1217 "version" : " v5" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ type RuntimeRequirement struct {
2828
2929// knownRuntimes is the list of all supported runtime configurations (alphabetically sorted by ID)
3030var knownRuntimes = []* Runtime {
31+ {
32+ ID : "bun" ,
33+ Name : "Bun" ,
34+ ActionRepo : "oven-sh/setup-bun" ,
35+ ActionVersion : "v2" ,
36+ VersionField : "bun-version" ,
37+ DefaultVersion : constants .DefaultBunVersion ,
38+ Commands : []string {"bun" , "bunx" },
39+ },
3140 {
3241 ID : "dotnet" ,
3342 Name : ".NET" ,
Original file line number Diff line number Diff line change @@ -11,6 +11,16 @@ func TestDetectRuntimeFromCommand(t *testing.T) {
1111 command string
1212 expected []string // Expected runtime IDs
1313 }{
14+ {
15+ name : "bun command" ,
16+ command : "bun install" ,
17+ expected : []string {"bun" },
18+ },
19+ {
20+ name : "bunx command" ,
21+ command : "bunx tsc" ,
22+ expected : []string {"bun" },
23+ },
1424 {
1525 name : "npm install command" ,
1626 command : "npm install" ,
@@ -257,6 +267,18 @@ func TestGenerateRuntimeSetupSteps(t *testing.T) {
257267 expectSteps int
258268 checkContent []string
259269 }{
270+ {
271+ name : "generates bun setup" ,
272+ requirements : []RuntimeRequirement {
273+ {Runtime : findRuntimeByID ("bun" ), Version : "1.1" },
274+ },
275+ expectSteps : 1 ,
276+ checkContent : []string {
277+ "Setup Bun" ,
278+ "oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76" ,
279+ "bun-version: '1.1'" ,
280+ },
281+ },
260282 {
261283 name : "generates node setup" ,
262284 requirements : []RuntimeRequirement {
You can’t perform that action at this time.
0 commit comments