danger-plugin-istanbul-coverage icon indicating copy to clipboard operation
danger-plugin-istanbul-coverage copied to clipboard

Cannot find module 'danger-plugin-istanbul-coverage' for github workflow

Open anuroop15 opened this issue 4 years ago • 1 comments

name: Danger JS on: pull_request: branches: [ develop ] push: branches: [ develop, main ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Use node version from .nvmrc uses: actions/setup-node@v1 with: node-version: "${{ steps.nvm.outputs.NVMRC }}" - name: Danger run: npx danger ci env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Looks like gitHub actions is looking for node modules when running dangerfile. Is there a way I can run istanbul coverage on github.

anuroop15 avatar Jun 30 '21 23:06 anuroop15

`import { danger, warn, markdown, message, fail, schedule } from 'danger'; import { istanbulCoverage } from 'danger-plugin-istanbul-coverage'; schedule(() => istanbulCoverage({ // The location of the istanbul coverage file. //coveragePath: "./coverage/*.json", // Alternatively, if you have multiple coverage summaries, you can merge them into one report coveragePaths: pathList, // You can also specify the format, instead of letting it be inferred from the file name // coveragePath: { path: "./coverage//lcov.info", type: "lcov" },

// Which set of files to summarise from the coverage file.
reportFileSet: 'all', // || "modified" || "created" || "createdOrModified"

// What to do when the PR doesn't meet the minimum code coverage threshold
reportMode: 'message', // || "warn" || "fail"

// Minimum coverage threshold percentages. Compared against the cumulative coverage of the reportFileSet.
threshold: {
  statements: 100,
  branches: 100,
  functions: 100,
  lines: 100,
},

}) ); ` My Danger file looks like this

anuroop15 avatar Jul 01 '21 03:07 anuroop15