-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (64 loc) · 1.89 KB
/
Copy pathtest.yml
File metadata and controls
79 lines (64 loc) · 1.89 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
name: Tests
on:
workflow_call:
pull_request:
branches:
- main
push:
branches:
- main
paths:
- '.claude-plugin/**'
- 'plugins/slack-publish/**'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install jq
run: sudo apt-get install -y jq
- name: Run tests
run: make test
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install ruff pytest
- name: Lint
run: ruff check plugins/slack-publish/skills/publish/scripts/publish_markdown_to_slack.py
- name: Test
run: pytest plugins/slack-publish/tests/ -q --tb=short
sast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: SAST
run: make sast
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check for plugin path changes
id: paths
run: |
BASE="${{ github.event.pull_request.base.sha }}"
if [ -z "$BASE" ]; then BASE="HEAD~1"; fi
CHANGED=$(git diff --name-only "$BASE"...HEAD | grep -E \
'^(\.claude-plugin/|plugins/[^/]+/(\.claude-plugin|agents|skills|hooks|commands)/)' \
| wc -l)
echo "changed=$([ "$CHANGED" -gt 0 ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
- name: Validate plugins
if: steps.paths.outputs.changed == 'true'
uses: anthropics/claude-plugins-community/.github/actions/validate-plugins@f846a0bcb0e721b1f93d60e8b73e91dafc4a1e87
with:
marketplace-path: .claude-plugin/marketplace.json
warn-invariants: "I1 I5 I8"
claude-cli-version: latest