-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (102 loc) · 3.42 KB
/
ci.yml
File metadata and controls
119 lines (102 loc) · 3.42 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
117
118
119
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
validate:
name: Validate Skill Package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Validate package.json
run: |
echo "Validating package.json..."
node -e "JSON.parse(require('fs').readFileSync('package.json'))"
echo "✓ package.json is valid JSON"
- name: Validate .claude-skill.json
run: |
echo "Validating .claude-skill.json..."
node -e "JSON.parse(require('fs').readFileSync('.claude-skill.json'))"
echo "✓ .claude-skill.json is valid JSON"
- name: Check required files
run: |
echo "Checking required files..."
for file in SKILL.md agent.md reference.md README.md LICENSE; do
if [ -f "$file" ]; then
echo "✓ $file exists"
else
echo "✗ $file is missing"
exit 1
fi
done
- name: Check scripts
run: |
echo "Checking script files..."
for file in scripts/codex-runner.sh scripts/codex-runner.ps1 scripts/codex-yolo.sh scripts/codex-yolo.cmd; do
if [ -f "$file" ]; then
echo "✓ $file exists"
else
echo "✗ $file is missing"
exit 1
fi
done
- name: Lint shell scripts
run: |
echo "Checking shell scripts syntax..."
bash -n scripts/codex-runner.sh
bash -n scripts/codex-yolo.sh
bash -n scripts/install/install.sh
bash -n scripts/install/uninstall.sh
echo "✓ Shell scripts are valid"
test-install:
name: Test Installation
needs: validate
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18, 20, 22]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Create Claude directories
shell: bash
run: |
mkdir -p ~/.claude/commands
mkdir -p ~/.claude/agents
mkdir -p ~/.claude/scripts
- name: Run npm install script (Unix)
if: runner.os != 'Windows'
run: node scripts/npm-install.js
- name: Run npm install script (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: node scripts/npm-install.js
- name: Verify installation (Unix)
if: runner.os != 'Windows'
run: |
echo "Verifying installation..."
[ -f ~/.claude/commands/codex/SKILL.md ] && echo "✓ SKILL.md installed"
[ -f ~/.claude/agents/codex.md ] && echo "✓ agent.md installed"
- name: Verify installation (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "Verifying installation..."
if (Test-Path "$env:USERPROFILE\.claude\commands\codex\SKILL.md") {
Write-Host "✓ SKILL.md installed"
}
if (Test-Path "$env:USERPROFILE\.claude\agents\codex.md") {
Write-Host "✓ agent.md installed"
}