ArtiomTr / jest-coverage-report-action

Track your code coverage in every pull request.
https://www.covbot.dev
MIT License
499 stars 143 forks source link

Tests run 2 times instead of 1 #425

Open piotrwalczak1 opened 7 months ago

piotrwalczak1 commented 7 months ago

Describe a bug

Why the tests run 2 times in a row instead of 1? image

Then it's running it for the 2nd time? image

Expected behavior

Only 1 test run should be present

Details

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
      - uses: ArtiomTr/jest-coverage-report-action@v2.3.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          test-script: npm run test:ci

Additional context

In github actions I can see tests are run twice instead of just once.

lmalvasia commented 7 months ago

I've seen the same issue in our pipelines. Looks like it's running jest twice.

ab14bhardwaj commented 6 months ago

@ piotrwalczak1 The process involves running a test twice to compare the coverage report between the base and feature branches. You can gauge the disparities by examining the differences in the statements, branches, lines, and function fields between the two test results.