|
23 | 23 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
24 | 24 | run: | |
25 | 25 | # Download workflow runs for the ci workflow |
26 | | - gh run list --repo ${{ github.repository }} --workflow=ci.yml --limit 100 --json databaseId,status,conclusion,createdAt,updatedAt,displayTitle,headBranch,event,url,workflowDatabaseId,runNumber > /tmp/ci-runs.json |
| 26 | + gh run list --repo ${{ github.repository }} --workflow=ci.yml --limit 100 --json databaseId,status,conclusion,createdAt,updatedAt,displayTitle,headBranch,event,url,workflowDatabaseId,number > /tmp/ci-runs.json |
27 | 27 | |
28 | 28 | # Create directory for artifacts |
29 | 29 | mkdir -p /tmp/ci-artifacts |
@@ -73,11 +73,10 @@ steps: |
73 | 73 | run: make recompile |
74 | 74 |
|
75 | 75 | - name: Run unit tests |
76 | | - run: go test -v -count=1 -timeout=3m -tags '!integration' -run='^Test' ./... |
77 | | - |
78 | | - - name: Run JavaScript tests |
79 | | - run: npm test |
80 | | - working-directory: ./pkg/workflow/js |
| 76 | + continue-on-error: true |
| 77 | + run: | |
| 78 | + mkdir -p /tmp/gh-aw |
| 79 | + go test -v -json -count=1 -timeout=3m -tags '!integration' -run='^Test' ./... | tee /tmp/gh-aw/test-results.json |
81 | 80 | safe-outputs: |
82 | 81 | create-pull-request: |
83 | 82 | title-prefix: "[ci-coach] " |
@@ -108,12 +107,24 @@ Analyze the CI workflow daily to identify concrete optimization opportunities th |
108 | 107 | 2. **Artifacts**: `/tmp/ci-artifacts/` - Coverage reports and benchmark results from recent successful runs |
109 | 108 | 3. **CI Configuration**: `.github/workflows/ci.yml` - Current CI workflow configuration |
110 | 109 | 4. **Cache Memory**: `/tmp/cache-memory/` - Historical analysis data from previous runs |
| 110 | +5. **Test Results**: `/tmp/gh-aw/test-results.json` - JSON output from Go unit tests with performance and timing data |
| 111 | + |
| 112 | +### Test Case Information |
| 113 | +The Go test cases are located throughout the repository: |
| 114 | +- **Command tests**: `./cmd/gh-aw/*_test.go` - CLI command and main entry point tests |
| 115 | +- **Workflow tests**: `./pkg/workflow/*_test.go` - Workflow compilation, validation, and execution tests |
| 116 | +- **CLI tests**: `./pkg/cli/*_test.go` - Command implementation tests |
| 117 | +- **Parser tests**: `./pkg/parser/*_test.go` - Frontmatter and schema parsing tests |
| 118 | +- **Campaign tests**: `./pkg/campaign/*_test.go` - Campaign specification tests |
| 119 | +- **Other package tests**: Various `./pkg/*/test.go` files throughout the codebase |
| 120 | + |
| 121 | +The `/tmp/gh-aw/test-results.json` file contains detailed timing and performance data for each test case in JSON format, allowing you to identify slow tests, flaky tests, and optimization opportunities. |
111 | 122 |
|
112 | 123 | ### Environment Setup |
113 | 124 | The workflow has already completed: |
114 | 125 | - ✅ **Linting**: Dev dependencies installed, linters run successfully |
115 | 126 | - ✅ **Building**: Code built with `make build`, lock files compiled with `make recompile` |
116 | | -- ✅ **Testing**: Unit tests and JavaScript tests run successfully |
| 127 | +- ✅ **Testing**: Unit tests run (with performance data collected in JSON format) |
117 | 128 |
|
118 | 129 | This means you can: |
119 | 130 | - Make changes to code or configuration files |
|
0 commit comments