Repository navigation
46 lines (43 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
46 lines (43 loc) · 1.95 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3
with:
# Pinned so new ruff releases don't change the default rule set under us
version: "0.16.10"
validate:
name: Validate plugin structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Validate plugin manifest
run: python .github/scripts/validate.py
- name: Validate with Claude Code (strict)
run: |
npm install -g @anthropic-ai/claude-code@2.1.284
claude plugin validate --strict .
claude plugin validate --strict .claude-plugin/plugin.json
claude plugin validate --strict skills
- name: Marketplace ref points at a released tag on main
run: |
ref=$(jq -r '.plugins[] | select(.name=="obol") | .source.ref' .claude-plugin/marketplace.json)
[[ "$ref" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "marketplace ref '$ref' is not a vX.Y.Z tag"; exit 1; }
git fetch --quiet origin "+refs/heads/main:refs/remotes/origin/main" "+refs/tags/$ref:refs/tags/$ref" \
|| { echo "tag $ref is not on GitHub: tag main and push it first (see README > Releasing)"; exit 1; }
tagged=$(git show "$ref:.claude-plugin/plugin.json" | jq -r .version)
[ "v$tagged" = "$ref" ] || { echo "tag $ref contains plugin.json version $tagged"; exit 1; }
git merge-base --is-ancestor "$ref^{commit}" origin/main \
|| { echo "tag $ref is not on main: releases must be cut from main"; exit 1; }