Skip to content

Commit

Permalink
feat: ci job to list circular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsan-javaid authored and diwakergupta committed Sep 7, 2021
1 parent a34182f commit 9816b3c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/circular.dep.check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Circular dependency checks

on:
push:
branches:
- '**'

jobs:
lint:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v2

- name: Set Node Version
uses: actions/setup-node@v2
with:
node-version: 16

- name: Restore lerna cache
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm i

- name: Bootstrap
run: npm run bootstrap

- name: List circular dependencies
continue-on-error: true
run: npm run madge
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"lerna": "^3.22.1",
"madge": "^5.0.1",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"typedoc": "^0.20.35",
Expand All @@ -62,6 +63,7 @@
"lint:prettier:fix": "prettier --write \"packages/**/src/**/*.{ts,tsx|!(d.ts)}\" *.js",
"build:docs": "rimraf docs && typedoc --name \"Stacks.js $npm_package_version Library Reference\" --readme ./readme.md --tsconfig tsconfig.typedoc.json --out docs --json docs/docs.json packages/**/src/index.ts",
"test": "lerna run test",
"typecheck": "lerna run typecheck --parallel --no-bail --stream"
"typecheck": "lerna run typecheck --parallel --no-bail --stream",
"madge": "madge --circular --extensions ts --exclude 'd.ts' packages/"
}
}

1 comment on commit 9816b3c

@vercel
Copy link

@vercel vercel bot commented on 9816b3c Sep 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.