-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (87 loc) · 2.97 KB
/
test.yml
File metadata and controls
103 lines (87 loc) · 2.97 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
name: Test Workflows
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test-bundled-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
- name: Test bundled script exists
run: |
if [ ! -f "scripts/dist/discover-components.cjs" ]; then
echo "ERROR: Bundled script not found"
exit 1
fi
echo "✓ Bundled script exists"
- name: Test bundled script is executable
run: |
if [ ! -x "scripts/dist/discover-components.cjs" ]; then
echo "ERROR: Bundled script not executable"
exit 1
fi
echo "✓ Bundled script is executable"
test-discover-action:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Test discover action
id: discover
uses: ./agentic-marketplace/discover
with:
config-path: 'test-fixtures/valid/.claude-plugin/generator.config.toml'
- name: Verify discovery output
run: |
echo "Components discovered:"
echo "${{ steps.discover.outputs.components }}" | head -20
test-validate-action:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Test validate action
uses: ./agentic-marketplace/validate
with:
config-path: 'test-fixtures/valid/.claude-plugin/generator.config.toml'
test-end-to-end:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
- name: Test discovery
working-directory: test-fixtures/valid
run: |
../../scripts/dist/discover-components.cjs discover-all > output.json
cat output.json
echo "✓ Discovery works"
- name: Test validation
working-directory: test-fixtures/valid
run: |
../../scripts/dist/discover-components.cjs validate
echo "✓ Validation works"
- name: Test generation
working-directory: test-fixtures/valid
run: |
../../scripts/dist/discover-components.cjs generate
if [ -f ".claude-plugin/marketplace.json" ]; then
echo "✓ marketplace.json generated"
cat .claude-plugin/marketplace.json
else
echo "ERROR: marketplace.json not generated"
exit 1
fi