diff --git a/.github/workflows/jscpd.json b/.github/workflows/jscpd.json new file mode 100644 index 00000000000..87dd9ce943e --- /dev/null +++ b/.github/workflows/jscpd.json @@ -0,0 +1,7 @@ +{ + "pattern": "packages/**/*.ts", + "ignore": ["**node_modules**", "**dist**"], + "gitignore": true, + "threshold": 1.34, + "minLines": 15 +} diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a4d9827b831..ae255b30c76 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -55,6 +55,24 @@ jobs: - run: npm run testCompile - run: npm run lint + jscpd: + needs: lint-commits + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + env: + NODE_OPTIONS: '--max-old-space-size=8192' + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm install jscpd + - name: Run jscpd + run: npx jscpd --config "$GITHUB_WORKSPACE/.github/workflows/jscpd.json" + macos: needs: lint-commits name: test macOS