Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to generate test report after every run #349

Open
ArmandAgopian opened this issue Feb 11, 2023 · 1 comment
Open

Failing to generate test report after every run #349

ArmandAgopian opened this issue Feb 11, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ArmandAgopian
Copy link

Describe a bug

Action fails to generate test report no matter what arguments are used. Multiple errors listed below.

Expected behavior

The action displays coverage and test report separately

Details

  • Action version: v2.2.1-rc.0

  • OS, where your action is running (windows, linux):

  • action.yml file
      - name: Find PR Number
         uses: jwalton/gh-find-current-pr@v1
         id: findPr
    
      - name: Jest coverage report
        uses: ArtiomTr/jest-coverage-report-action@v2.2.1-rc.0
        with:
          test-script: npm run test:ci
          prnumber: ${{ steps.findPr.outputs.number }}
    
  • jest:ci command w/ config

    jest --runInBand --ci --json --testLocationInResults --outputFile=report.json

     import type {Config} from 'jest';
     
     export default async (): Promise<Config> => {
       return {
         preset: 'ts-jest',
         testEnvironment: 'node',
         testTimeout: 1000,
         collectCoverageFrom: [
           'src/**/*.[jt]s'
         ],
         coveragePathIgnorePatterns: [
           'src/server/[jt]s'
         ],
         testMatch: [
           '**/?(*.)+(spec|test).[jt]s?(x)'
         ],
         collectCoverage: true,
         coverageThreshold: {
           global: {
             branches: 95,
             functions: 95,
             lines: 95,
             statements: 95
           },
         },
       };
     };
  • Log File
    [Hastebin of error log](https://hastebin.com/share/ovohixuxug.yaml)
    

Additional context

@ArmandAgopian ArmandAgopian added the bug Something isn't working label Feb 11, 2023
@dev-dozer
Copy link

@ArmandAgopian I had the same problem with the latest version of the action. At the same time, it was fixed using an older version of 2.0.6. We need to wait until this bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants