-
Notifications
You must be signed in to change notification settings - Fork 516
106 lines (88 loc) · 2.67 KB
/
Copy pathtest-plugin.yml
File metadata and controls
106 lines (88 loc) · 2.67 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
name: Test Plugin
on:
push:
branches: [main]
pull_request:
paths:
- 'plugins/**'
- 'scripts/**'
- '.claude-plugin/**'
- 'tests/**'
- 'package.json'
jobs:
validate:
name: Schema Validation
runs-on: ubuntu-latest
# Don't block PRs on failure - advisory only
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run validation
run: npm run validate
- name: Upload validation report
uses: actions/upload-artifact@v4
if: always()
with:
name: validation-reports
path: |
validation-report.txt
hook-validation-report.json
integration:
name: Integration Tests
runs-on: ubuntu-latest
needs: validate
# Don't block PRs on failure - advisory only
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run plugin test harness
run: |
chmod +x tests/plugin-test-harness.sh
tests/plugin-test-harness.sh
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: tests/test-results.json
summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [validate, integration]
if: always()
steps:
- name: Generate summary
env:
VALIDATE_RESULT: ${{ needs.validate.result }}
INTEGRATION_RESULT: ${{ needs.integration.result }}
run: |
echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "$VALIDATE_RESULT" == "success" ]; then
echo "✅ **Schema Validation**: Passed" >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ **Schema Validation**: Failed (advisory)" >> $GITHUB_STEP_SUMMARY
fi
if [ "$INTEGRATION_RESULT" == "success" ]; then
echo "✅ **Integration Tests**: Passed" >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ **Integration Tests**: Failed (advisory)" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "_Note: Test failures are advisory and do not block merging._" >> $GITHUB_STEP_SUMMARY