@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
yml 85 lines 2.7 KB
Raw
1 name: Dead Code
2
3 # Surfaces likely-dead code once a week so orphaned files/exports/deps get
4 # noticed instead of rotting (see the root Dockerfile cleanup, #3783).
5 #
6 # Report-only by design: every job writes findings to the run's Step Summary
7 # and never fails the build. These tools carry false positives (public API
8 # surface, dynamic imports, import-map targets), so a red X here would train
9 # people to ignore it. Tighten a job to blocking only once its config is
10 # refined enough that a clean run is the steady state.
11 #
12 # It runs weekly rather than on every PR because nobody acts on a per-PR
13 # report-only result. Run it on demand to check a branch.
14
15 on:
16 schedule:
17 - cron: '0 6 * * 1'
18 workflow_dispatch:
19
20 concurrency:
21 group: ${{ github.workflow }}-${{ github.ref }}
22 cancel-in-progress: true
23
24 permissions:
25 contents: read
26
27 jobs:
28 knip:
29 name: TypeScript (knip)
30 runs-on: ubuntu-latest
31 steps:
32 - name: Checkout Code
33 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34
35 - name: Setup Node.js, pnpm, Bun
36 uses: ./.github/actions/setup-node-pnpm-bun
37
38 - name: Install dependencies
39 run: pnpm install --frozen-lockfile
40
41 - name: Run knip (report-only)
42 run: |
43 {
44 echo '## Knip — TypeScript dead code'
45 echo ''
46 echo 'Unused files, exports, types and dependencies. False positives'
47 echo 'usually mean a missing `entry` in `knip.json`; vet before deleting.'
48 echo ''
49 echo '```'
50 pnpm dlx knip@5 --no-exit-code --no-progress 2>&1 || true
51 echo '```'
52 } >> "$GITHUB_STEP_SUMMARY"
53
54 vulture:
55 name: Python (vulture)
56 runs-on: ubuntu-latest
57 steps:
58 - name: Checkout Code
59 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60
61 - name: Setup Python with UV
62 uses: ./.github/actions/setup-python-uv
63
64 - name: Run vulture (report-only)
65 run: |
66 {
67 echo '## Vulture — Python dead code'
68 echo ''
69 echo 'Likely-unused functions, classes and variables. Suppress'
70 echo 'confirmed false positives in `python/config/vulture_allowlist.py`.'
71 echo ''
72 echo '```'
73 (cd python && uv run nox -s dead_code) 2>&1 || true
74 echo '```'
75 } >> "$GITHUB_STEP_SUMMARY"
76
77 orphaned-ci:
78 name: GitHub Actions (orphan check)
79 runs-on: ubuntu-latest
80 steps:
81 - name: Checkout Code
82 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
83
84 - name: Check for orphaned workflows and composite actions
85 run: bash .github/scripts/check-orphan-ci.sh >> "$GITHUB_STEP_SUMMARY"