Files
2026-08-15 06:26:39 +05:30

99 lines
3.5 KiB
YAML

name: Validate plugin packaging
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: validate-plugin-packaging-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Skills, Codex, and Claude
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CLAUDE_CODE_VERSION: 2.1.198
CODEX_CLI_VERSION: 0.144.1
SKILLS_REF_VERSION: 0.1.1
steps:
- name: Check out repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- name: Install Agent Skills validator
run: python -m pip install "skills-ref==${SKILLS_REF_VERSION}"
- name: Validate all Agent Skills
shell: bash
run: |
set -euo pipefail
skill_count=0
for skill_dir in skills/*; do
[[ -d "${skill_dir}" ]] || continue
agentskills validate "${skill_dir}"
skill_count=$((skill_count + 1))
done
test "${skill_count}" -eq 25
- name: Validate cross-host manifests
run: python scripts/validate-plugin-packaging.py . --expected-skills 25
- name: Test packaging validator
run: python -m unittest discover -s tests -p 'test_*.py'
- name: Set up Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: "22"
- name: Install pinned host CLIs
run: |
npm install --global \
"@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" \
"@openai/codex@${CODEX_CLI_VERSION}"
- name: Load Codex plugin
shell: bash
run: |
set -euo pipefail
asc_codex_marketplace_root="${RUNNER_TEMP}/asc-codex-marketplace"
cp -R tests/fixtures/codex-marketplace "${asc_codex_marketplace_root}"
mkdir -p "${asc_codex_marketplace_root}/plugins/asc"
cp -R .codex-plugin skills "${asc_codex_marketplace_root}/plugins/asc/"
codex plugin marketplace add "${asc_codex_marketplace_root}" --json
install_json="$(codex plugin add asc@asc-ci --json)"
printf '%s\n' "${install_json}"
installed_path="$(jq -er '.installedPath' <<<"${install_json}")"
test -d "${installed_path}/skills"
skill_count="$(find "${installed_path}/skills" -mindepth 2 -maxdepth 2 -type f -name SKILL.md | wc -l | tr -d ' ')"
test "${skill_count}" -eq 25
- name: Validate and load Claude plugin
shell: bash
run: |
set -euo pipefail
claude plugin validate .claude-plugin/plugin.json --strict
claude plugin validate .claude-plugin/marketplace.json --strict
asc_claude_config_dir="${RUNNER_TEMP}/asc-claude-config"
mkdir -p "${asc_claude_config_dir}"
CLAUDE_CONFIG_DIR="${asc_claude_config_dir}" claude plugin marketplace add ./
CLAUDE_CONFIG_DIR="${asc_claude_config_dir}" claude plugin install asc@rorkai
details="$(CLAUDE_CONFIG_DIR="${asc_claude_config_dir}" claude plugin details asc@rorkai)"
printf '%s\n' "${details}"
grep -F "Skills (25)" <<<"${details}"
# Codex CLI 0.144.1 has no plugin validation subcommand, so its manifest is
# checked by the repository validator and loaded from a disposable CI-only
# marketplace. No developer marketplace configuration is touched.