Skip to content

Commit f2bff5d

Browse files
authored
Track compiled lock files for the new test workflows (#44551)
1 parent 7833adf commit f2bff5d

7 files changed

Lines changed: 44 additions & 18 deletions

File tree

docs/src/content/docs/agent-factory-status.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,7 @@ These are experimental agentic workflows used by the GitHub Next team to learn,
238238
| [Super Linter Report](https://github.com/github/gh-aw/blob/main/.github/workflows/super-linter.md) | copilot | [![Super Linter Report](https://github.com/github/gh-aw/actions/workflows/super-linter.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/super-linter.lock.yml) | `daily around 14:00 on weekdays` | - |
239239
| [Team Status](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-team-status.md) | copilot | [![Team Status](https://github.com/github/gh-aw/actions/workflows/daily-team-status.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-team-status.lock.yml) | - | - |
240240
| [Terminal Stylist](https://github.com/github/gh-aw/blob/main/.github/workflows/terminal-stylist.md) | copilot | [![Terminal Stylist](https://github.com/github/gh-aw/actions/workflows/terminal-stylist.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/terminal-stylist.lock.yml) | - | - |
241-
| [Test Create PR Error Handling](https://github.com/github/gh-aw/blob/main/.github/workflows/test-create-pr-error-handling.md) | claude | [![Test Create PR Error Handling](https://github.com/github/gh-aw/actions/workflows/test-create-pr-error-handling.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/test-create-pr-error-handling.lock.yml) | - | - |
242-
| [Test Dispatcher Workflow](https://github.com/github/gh-aw/blob/main/.github/workflows/test-dispatcher.md) | copilot | [![Test Dispatcher Workflow](https://github.com/github/gh-aw/actions/workflows/test-dispatcher.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/test-dispatcher.lock.yml) | - | - |
243-
| [Test Project URL Explicit Requirement](https://github.com/github/gh-aw/blob/main/.github/workflows/test-project-url-default.md) | copilot | [![Test Project URL Explicit Requirement](https://github.com/github/gh-aw/actions/workflows/test-project-url-default.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/test-project-url-default.lock.yml) | - | - |
244241
| [Test Quality Sentinel](https://github.com/github/gh-aw/blob/main/.github/workflows/test-quality-sentinel.md) | copilot | [![Test Quality Sentinel](https://github.com/github/gh-aw/actions/workflows/test-quality-sentinel.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/test-quality-sentinel.lock.yml) | - | - |
245-
| [Test Workflow](https://github.com/github/gh-aw/blob/main/.github/workflows/test-workflow.md) | copilot | [![Test Workflow](https://github.com/github/gh-aw/actions/workflows/test-workflow.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/test-workflow.lock.yml) | - | - |
246242
| [The Daily Repository Chronicle](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-repo-chronicle.md) | copilot | [![The Daily Repository Chronicle](https://github.com/github/gh-aw/actions/workflows/daily-repo-chronicle.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-repo-chronicle.lock.yml) | `daily around 16:00 on weekdays` | - |
247243
| [The Great Escapi](https://github.com/github/gh-aw/blob/main/.github/workflows/firewall-escape.md) | copilot | [![The Great Escapi](https://github.com/github/gh-aw/actions/workflows/firewall-escape.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/firewall-escape.lock.yml) | - | - |
248244
| [Tidy](https://github.com/github/gh-aw/blob/main/.github/workflows/tidy.md) | copilot | [![Tidy](https://github.com/github/gh-aw/actions/workflows/tidy.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/tidy.lock.yml) | `daily around 7:00` | - |

pkg/cli/add_command_test.go

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,26 @@ func TestAddWorkflows(t *testing.T) {
142142

143143
func TestAddResolvedWorkflows(t *testing.T) {
144144
tests := []struct {
145-
name string
146-
expectError bool
147-
errorContains string
145+
name string
148146
}{
149147
{
150-
name: "valid workflow",
151-
expectError: true, // Will still error due to missing git repo, but validates basic flow
148+
name: "valid workflow",
152149
},
153150
}
154151

155152
for _, tt := range tests {
156153
t.Run(tt.name, func(t *testing.T) {
154+
tmpDir := t.TempDir()
155+
oldWd, err := os.Getwd()
156+
require.NoError(t, err)
157+
require.NoError(t, os.Chdir(tmpDir))
158+
defer func() {
159+
require.NoError(t, os.Chdir(oldWd))
160+
}()
161+
gitInit := exec.Command("git", "init")
162+
gitInit.Dir = tmpDir
163+
require.NoError(t, gitInit.Run())
164+
157165
// Create a minimal resolved workflow structure
158166
resolved := &ResolvedWorkflows{
159167
Workflows: []*ResolvedWorkflow{
@@ -170,21 +178,17 @@ func TestAddResolvedWorkflows(t *testing.T) {
170178
}
171179

172180
opts := AddOptions{}
173-
_, err := AddResolvedWorkflows(
181+
_, err = AddResolvedWorkflows(
174182
context.Background(),
175183
[]string{"test/repo/test-workflow"},
176184
resolved,
177185
opts,
178186
)
187+
require.NoError(t, err, "Should not error for test case: %s", tt.name)
179188

180-
if tt.expectError {
181-
require.Error(t, err, "Expected error for test case: %s", tt.name)
182-
if tt.errorContains != "" {
183-
assert.Contains(t, err.Error(), tt.errorContains, "Error should contain expected message")
184-
}
185-
} else {
186-
assert.NoError(t, err, "Should not error for test case: %s", tt.name)
187-
}
189+
workflowPath := filepath.Join(tmpDir, ".github", "workflows", "test-workflow.md")
190+
_, err = os.Stat(workflowPath)
191+
require.NoError(t, err, "workflow should be written to the temporary workflows directory")
188192
})
189193
}
190194
}

pkg/cli/workflows/shared/otlp.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
network:
3+
allowed:
4+
- "*.sentry.io"
5+
- "*.grafana.net"
6+
observability:
7+
otlp:
8+
endpoint:
9+
- url: ${{ secrets.GH_AW_OTEL_SENTRY_ENDPOINT }}
10+
headers:
11+
Authorization: ${{ secrets.GH_AW_OTEL_SENTRY_AUTHORIZATION }}
12+
- url: ${{ secrets.GH_AW_OTEL_GRAFANA_ENDPOINT }}
13+
headers:
14+
Authorization: ${{ secrets.GH_AW_OTEL_GRAFANA_AUTHORIZATION }}
15+
---
16+
17+
<!--
18+
## Required secrets
19+
20+
Consumers of this shared import must provision the following secrets:
21+
22+
- `GH_AW_OTEL_SENTRY_ENDPOINT`
23+
- `GH_AW_OTEL_SENTRY_AUTHORIZATION`
24+
- `GH_AW_OTEL_GRAFANA_ENDPOINT`
25+
- `GH_AW_OTEL_GRAFANA_AUTHORIZATION`
26+
-->
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)