Repository navigation
116 lines (106 loc) · 3.34 KB
/
Copy pathopencode.yml
File metadata and controls
116 lines (106 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: OpenCode
on:
push:
branches: [main]
paths:
- ".opencode/**"
- "opencode/**"
- "opencode.json"
- "package.json"
- "skills/**"
- "agents/**"
- "extensions/**"
- "schema/**"
- "data/**"
- "hooks/**"
- "tests/**"
- ".gitattributes"
- ".gitignore"
- "scripts/build_opencode.py"
- "scripts/install_opencode_extension.py"
- "scripts/install_opencode_package.py"
- "scripts/sync_opencode_layout.py"
- "scripts/runtime.py"
- "scripts/claude-seo"
- "scripts/opencode-seo"
- "scripts/opencode-seo.ps1"
- "tests/test_opencode_*.py"
- "tests/test_no_em_dash.py"
- "extensions/install-opencode.*"
- "install-opencode.*"
- "docs/OPENCODE-*.md"
- "AGENTS.md"
- ".github/workflows/opencode.yml"
pull_request:
branches: [main]
paths:
- ".opencode/**"
- "opencode/**"
- "opencode.json"
- "package.json"
- "skills/**"
- "agents/**"
- "extensions/**"
- "schema/**"
- "data/**"
- "hooks/**"
- "tests/**"
- ".gitattributes"
- ".gitignore"
- "scripts/build_opencode.py"
- "scripts/install_opencode_extension.py"
- "scripts/install_opencode_package.py"
- "scripts/sync_opencode_layout.py"
- "scripts/runtime.py"
- "scripts/claude-seo"
- "scripts/opencode-seo"
- "scripts/opencode-seo.ps1"
- "tests/test_opencode_*.py"
- "tests/test_no_em_dash.py"
- "extensions/install-opencode.*"
- "install-opencode.*"
- "docs/OPENCODE-*.md"
- "AGENTS.md"
- ".github/workflows/opencode.yml"
permissions:
contents: read
jobs:
opencode:
name: OpenCode target
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.12
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Install minimal test dependencies
run: python -m pip install --disable-pip-version-check pytest requests
- name: Compile OpenCode scripts
run: |
python -m py_compile \
scripts/build_opencode.py \
scripts/install_opencode_extension.py \
scripts/install_opencode_package.py \
scripts/seo_paths.py \
scripts/sync_opencode_layout.py \
scripts/runtime.py
- name: Check generated target
run: python scripts/build_opencode.py --check
- name: Reject Claude-only tokens in the OpenCode target
run: |
if grep -RInE '\$\{CLAUDE_PLUGIN_ROOT\}|mcp__|maxTurns|seo run run|~/\.config/claude-seo|~/\.cache/claude-seo' .opencode/skills .opencode/agents; then
echo "::error::Claude-only tokens found in the generated OpenCode target"
exit 1
fi
- name: Run OpenCode tests
run: |
pytest -q \
tests/test_opencode_generation.py \
tests/test_opencode_orchestration.py \
tests/test_opencode_extension_install.py \
tests/test_opencode_package_install.py \
tests/test_opencode_env_aliases.py \
tests/test_seo_paths.py \
tests/test_no_em_dash.py