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

Add Coveralls test in CI #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add Coveralls test in CI #15

wants to merge 4 commits into from

Conversation

marilyn79218
Copy link
Owner

@marilyn79218 marilyn79218 commented Apr 25, 2021

As title

Steps:

  1. Use jest --coverage to generate coverage report in CI step.
  2. Add this repo to Coveralls. See screenshot-1.
  3. Will see instruction when you click on the details button in screenshot-1, and it redirect to screenshot-2 where it says you should add .coveralls.yml for it.
  4. Generate Github perosnal access token at Github page. Use your repo token shown in coveralls page (e.g., https://coveralls.io/builds/<build_id>). See the token shown in screenshot-2.
  5. Add the token just generated in the .coveralls.yml.
  6. Push your changes to Github that triggers test and coverage/coveralls CI checks.
  7. Coverage data is passed to coveralls page as shown in screenshot-3.

Sidenotes:

Number Screenshots
1 image
2 image
3 image
4 image

- run: yarn test
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Owner Author

@marilyn79218 marilyn79218 Apr 25, 2021

Choose a reason for hiding this comment

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

Note: the GITHUB_TOKEN is built into Github Actions and does not need to be manually specified in your (repo) secrets store. See screenshot.

See Coveralls GitHub Action or Github doc.

image

@marilyn79218
Copy link
Owner Author

marilyn79218 commented Apr 25, 2021

Successfully run coveralls in CI checks

image

…(add it back) repo back to coveralls with the new given token by coveralls page
@marilyn79218 marilyn79218 changed the title Add test in CI Add Coveralls test in CI May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant