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

feat: add the NYC code coverage #2354

Closed

Conversation

sambhavgupta0705
Copy link
Member

Description

  • added the nyc test coverage for testing the code coverage of cypress testing

Related issue(s)
#2104

Copy link

netlify bot commented Nov 28, 2023

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bbaccc2
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/657c000fd7aef30008a20207
😎 Deploy Preview https://deploy-preview-2354--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Nov 28, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 29
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-2354--asyncapi-website.netlify.app/

Copy link
Member

@akshatnema akshatnema left a comment

Choose a reason for hiding this comment

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

All the intrumented, coverage folder should be part of .gitignore. And I also see that you forgot to run node scripts/index.js command before copying the config folder. Add it inside script.

Also, you need to copy following files from the root to the instrumented folder:

  • dashboard.json
  • scripts/tools/tools-schema.json

Also, do find out if any other files are missing inside instrumented folder and copy it from the root directory.

run: npx nyc instrument ./ instrumented

- name: Move folder
run: mv config instrumented
Copy link
Member

Choose a reason for hiding this comment

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

We should use cp command instead of mv. Also, move the entire folder using the command:

cp -r config instrumented/config

run: mv config instrumented

- name: Run tests with coverage
run: npm run test:coverage
Copy link
Member

Choose a reason for hiding this comment

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

Instead of running the separate command/workflow for test coverage, can't we merge it with cypress-tests.yml workflow?

@akshatnema
Copy link
Member

image

Also, while previewing the HTML report of lcov, I can't see any coverage there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants