Skip to content

Commit 836177f

Browse files
committed
add presubmit workflow for skills
1 parent 9d771f6 commit 836177f

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Validate Skills
16+
17+
on:
18+
push:
19+
branches:
20+
- main
21+
paths:
22+
- "skills/**"
23+
pull_request:
24+
branches:
25+
- main
26+
paths:
27+
- "skills/**"
28+
workflow_dispatch:
29+
30+
jobs:
31+
validate:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Checkout agentskills/agentskills
37+
uses: actions/checkout@v4
38+
with:
39+
repository: agentskills/agentskills
40+
path: agentskills
41+
42+
- name: Set up Python
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: "3.11"
46+
47+
- name: Install skills-ref
48+
run: |
49+
cd agentskills/skills-ref
50+
pip install .
51+
52+
- name: Validate Skills
53+
run: |
54+
failed=0
55+
for skill_dir in skills/*/; do
56+
if [ -d "$skill_dir" ]; then
57+
echo "Validating $skill_dir..."
58+
if ! skills-ref validate "$skill_dir"; then
59+
echo "Validation failed for $skill_dir"
60+
failed=1
61+
fi
62+
fi
63+
done
64+
exit $failed

0 commit comments

Comments
 (0)