Repository navigation
149 lines (142 loc) · 5.84 KB
/
Copy pathplugin-tests.yml
File metadata and controls
149 lines (142 loc) · 5.84 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Consolidated CI for the stable e2a plugin and experimental e2a Labs plugin.
# Package validation and skill suites run in parallel on every pull request and
# main push so the release gate cannot be skipped by GitHub's path-filter file
# limit. The model-backed Agentify fixtures run only when their inputs change,
# and skip cleanly when model credentials are absent.
name: Plugin tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch: {}
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
package:
name: Package and manifests
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CLAUDE_CODE_VERSION: "2.1.226"
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-node@v7
with:
node-version: "22"
# The version-bump gate diffs the base against the working tree, so it
# must run before anything that mutates the checkout. In particular
# `npm ci` inside the vendored email-evals runtime creates ignored local
# node_modules on Linux (including platform-specific esbuild binaries),
# which should not affect the version-bump diff.
- name: Require plugin version bumps in pull requests
if: github.event_name == 'pull_request'
env:
PLUGIN_VERSION_BASE: ${{ github.event.pull_request.base.sha }}
run: node scripts/check-plugin-version-bump.mjs "$PLUGIN_VERSION_BASE"
- name: Require plugin version bumps pushed to main
if: github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000'
env:
PLUGIN_VERSION_BASE: ${{ github.event.before }}
run: node scripts/check-plugin-version-bump.mjs "$PLUGIN_VERSION_BASE"
- run: npm install --global "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}"
- name: Install email-evals runtime dependencies
run: npm ci --ignore-scripts --prefix plugins/e2a/skills/email-evals/runtime
- name: Run email-evals runtime tests
run: npm test --prefix plugins/e2a/skills/email-evals/runtime
- name: Run plugin contract tests
run: node --test scripts/plugin-agent-guidance.test.mjs scripts/plugin-core-skills.test.mjs scripts/plugin-packaging.test.mjs scripts/plugin-email-evals.test.mjs scripts/check-plugin-version-bump.test.mjs scripts/validate-plugin.test.mjs
- name: Validate repository plugin contracts
run: node scripts/validate-plugin.mjs
- name: Validate Claude plugin manifests
run: |
claude plugin validate --strict plugins/e2a
claude plugin validate --strict plugins/e2a-labs
agentify:
name: Agentify deterministic suite
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: "22"
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install PyYAML for config validation
run: pip install --quiet pyyaml
- name: Run Agentify tests
run: bash plugins/e2a-labs/skills/agentify/test/run.sh
autopilot:
name: Autopilot suite
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: "22"
- name: Run Autopilot tests
run: node --test plugins/e2a-labs/skills/autopilot/test/*.test.mjs
tether:
name: Tether self-test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: "22"
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Run Tether runtime self-test
run: bash plugins/e2a-labs/skills/tether/tether.sh _selftest
agentify-fixtures:
name: Agentify live fixtures
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Detect fixture-relevant changes
id: fixture-changes
env:
EVENT_NAME: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
run_fixtures=true
elif git diff --quiet "$BASE_SHA"...HEAD -- \
plugins/e2a-labs/skills/agentify/templates/runtime-skill \
plugins/e2a-labs/skills/agentify/templates/workflows/feedback-triage.yml.tmpl \
plugins/e2a-labs/skills/agentify/examples/e2a/autonomous-repo.config.yml \
plugins/e2a-labs/skills/agentify/test/fixtures \
.github/workflows/plugin-tests.yml; then
run_fixtures=false
else
run_fixtures=true
fi
echo "run_fixtures=$run_fixtures" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v7
if: steps.fixture-changes.outputs.run_fixtures == 'true'
with:
node-version: "22"
- name: Install Claude Code and fixture dependencies
if: steps.fixture-changes.outputs.run_fixtures == 'true'
run: |
npm install --global @anthropic-ai/claude-code
npm install --prefix plugins/e2a-labs/skills/agentify/test/fixtures/harness
- name: Run Agentify lane fixtures
if: steps.fixture-changes.outputs.run_fixtures == 'true'
env:
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: bash plugins/e2a-labs/skills/agentify/test/fixtures/run-fixtures.sh