diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 31cc8b069..2e9138054 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -32,5 +32,18 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Circular Dependency Check - run: npx madge --circular --ts-config tsconfig.json --extensions ts,js src/ - continue-on-error: true \ No newline at end of file + run: | + npx madge --circular --ts-config tsconfig.json --extensions ts,js src/ > circular-deps.log || true # Force exit 0 for post-processing + egrep -E "^\d+\).*" circular-deps.log > tmp.log && mv tmp.log circular-deps.log + echo "CHECK" + cat circular-deps.log + wc -l < circular-deps.log + echo "CHECK" + if [ $(wc -l < circular-deps.log) -gt 18 ]; then + echo "circular-deps.log has more than 18 circular dependencies." + wc -l circular-deps.log + # exit 1 + else + echo "circular-deps.log has 18 or fewer circular dependencies." + # exit 0 + fi \ No newline at end of file diff --git a/circular-deps.log b/circular-deps.log new file mode 100644 index 000000000..b28c17935 --- /dev/null +++ b/circular-deps.log @@ -0,0 +1,18 @@ +1) lib/assets/index.ts > lib/assets/deploy.ts +2) lib/assets/index.ts > lib/assets/deploy.ts > lib/assets/pods.ts +3) lib/types.ts > lib/mutate-request.ts +4) lib/types.ts > lib/validate-request.ts +5) lib.ts > lib/capability.ts > lib/module.ts +6) lib/capability.ts > lib/module.ts +7) lib/capability.ts > lib/module.ts > lib/controller/index.ts +8) lib/capability.ts > lib/module.ts > lib/controller/index.ts > lib/controller/store.ts +9) lib/module.ts > lib/controller/index.ts +10) lib/capability.ts > lib/module.ts > lib/controller/index.ts > lib/mutate-processor.ts +11) lib/module.ts > lib/controller/index.ts > lib/mutate-processor.ts +12) lib/capability.ts > lib/module.ts > lib/controller/index.ts > lib/validate-processor.ts +13) lib/module.ts > lib/controller/index.ts > lib/validate-processor.ts +14) lib/capability.ts > lib/module.ts > lib/watch-processor.ts +15) lib/helpers.ts > sdk/sdk.ts > lib.ts > lib/capability.ts > lib/module.ts > lib/watch-processor.ts +16) sdk/sdk.ts > lib.ts +17) lib/assets/index.ts > lib/assets/deploy.ts > lib/assets/webhooks.ts +18) lib/assets/index.ts > lib/assets/yaml.ts