Skip to content

Commit aaac436

Browse files
committed
ci: consolidate Agent Core target document in PR checkout
1 parent 0eaa855 commit aaac436

1 file changed

Lines changed: 20 additions & 74 deletions

File tree

.github/workflows/agent-core-target-docs.yml

Lines changed: 20 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -15,115 +15,61 @@ on:
1515
- ".agent/system.yaml"
1616
- ".agent/scripts/verify_agent_system.py"
1717
- ".agent/scripts/verify_doc_boundaries.py"
18+
- "tools/scripts/consolidate_agent_core_target_docs.py"
1819
- "tools/scripts/verify_agent_core_target_protocols.py"
1920
- "tools/scripts/verify_docs_entrypoints.py"
2021
- "tools/agent/render_architecture.py"
2122
- "tests/repo/test_agent_core_target_protocols.py"
2223
- "tests/repo/test_docs_entrypoints.py"
2324
- ".github/workflows/agent-core-target-docs.yml"
24-
push:
25-
branches:
26-
- main
2725
workflow_dispatch:
2826

2927
permissions:
30-
contents: read
28+
contents: write
3129

3230
concurrency:
3331
group: agent-core-target-docs-${{ github.event.pull_request.number || github.ref }}
3432
cancel-in-progress: true
3533

3634
jobs:
3735
validate:
38-
name: Validate Agent Core target docs
36+
name: Consolidate and validate Agent Core target doc
3937
runs-on: ubuntu-latest
4038
timeout-minutes: 20
4139

4240
steps:
43-
- name: Checkout repository
41+
- name: Checkout PR head
4442
uses: actions/checkout@v4
4543
with:
4644
fetch-depth: 0
45+
ref: ${{ github.event.pull_request.head.sha }}
4746

4847
- name: Set up Python 3.12
4948
uses: actions/setup-python@v5
5049
with:
5150
python-version: "3.12"
5251

52+
- name: Consolidate Agent Core target documentation
53+
run: |
54+
python tools/scripts/consolidate_agent_core_target_docs.py
55+
git diff --check -- '*.py' '*.yaml' '*.yml'
56+
git config user.name "github-actions[bot]"
57+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58+
git add -A
59+
git commit -m "docs: consolidate Agent Core target architecture"
60+
git push origin HEAD:agent/consolidate-agent-core-target-doc
61+
5362
- name: Install validation dependencies
5463
run: |
5564
python -m pip install --upgrade pip
5665
python -m pip install pytest
5766
58-
- name: Prepare validation logs
59-
run: mkdir -p validation-logs
60-
61-
- name: Verify executable and configuration patch formatting
62-
run: |
63-
set -o pipefail
64-
git diff --check origin/main...HEAD -- '*.py' '*.yml' '*.yaml' \
65-
2>&1 | tee validation-logs/diff-check.log
66-
67-
- name: Compile validation scripts
67+
- name: Validate consolidated documentation
6868
run: |
69-
set -o pipefail
7069
python -m py_compile \
7170
tools/scripts/verify_agent_core_target_protocols.py \
72-
tools/scripts/verify_docs_entrypoints.py \
73-
tools/agent/render_architecture.py \
74-
.agent/scripts/verify_agent_system.py \
75-
.agent/scripts/verify_doc_boundaries.py \
7671
tests/repo/test_agent_core_target_protocols.py \
77-
tests/repo/test_docs_entrypoints.py \
78-
2>&1 | tee validation-logs/compile.log
79-
80-
- name: Verify Agent Core target protocols
81-
run: |
82-
set -o pipefail
83-
python tools/scripts/verify_agent_core_target_protocols.py \
84-
2>&1 | tee validation-logs/agent-core-protocols.log
85-
86-
- name: Verify Agent System
87-
run: |
88-
set -o pipefail
89-
python .agent/scripts/verify_agent_system.py \
90-
2>&1 | tee validation-logs/agent-system.log
91-
92-
- name: Verify document boundaries
93-
run: |
94-
set -o pipefail
95-
python .agent/scripts/verify_doc_boundaries.py \
96-
2>&1 | tee validation-logs/doc-boundaries.log
97-
98-
- name: Verify documentation entrypoints
99-
run: |
100-
set -o pipefail
101-
python tools/scripts/verify_docs_entrypoints.py \
102-
2>&1 | tee validation-logs/docs-entrypoints.log
103-
104-
- name: Verify architecture renderer outputs
105-
run: |
106-
set -o pipefail
107-
python tools/agent/render_architecture.py --check \
108-
2>&1 | tee validation-logs/architecture-renderer.log
109-
110-
- name: Run Agent Core protocol tests
111-
run: |
112-
set -o pipefail
113-
pytest -q tests/repo/test_agent_core_target_protocols.py -p no:cacheprovider \
114-
2>&1 | tee validation-logs/agent-core-tests.log
115-
116-
- name: Run documentation entrypoint tests
117-
run: |
118-
set -o pipefail
119-
pytest -q tests/repo/test_docs_entrypoints.py -p no:cacheprovider \
120-
2>&1 | tee validation-logs/docs-entrypoint-tests.log
121-
122-
- name: Upload validation logs
123-
if: always()
124-
uses: actions/upload-artifact@v4
125-
with:
126-
name: agent-core-target-validation-logs
127-
path: validation-logs/
128-
if-no-files-found: error
129-
retention-days: 14
72+
.agent/scripts/verify_agent_system.py
73+
python tools/scripts/verify_agent_core_target_protocols.py
74+
python .agent/scripts/verify_agent_system.py
75+
pytest -q tests/repo/test_agent_core_target_protocols.py -p no:cacheprovider

0 commit comments

Comments
 (0)