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

Push coverage from GH Actions; remove TravisCI #1034

Merged
merged 14 commits into from
May 10, 2020

Conversation

cspotcode
Copy link
Collaborator

@cspotcode cspotcode commented May 10, 2020

@blakeembrey Are there environment variables that need to be passed to coveralls? I can't seem to see where they would be configured on TravisCI.

Also fixes failing lint step after upgrading typescript compiler version.
node 6 tests uncovered this since they do not obey package-lock.json
EDIT moved this to a separate PR #1035

Do we need to preserve notifications behavior?

notifications:
  email:
    on_success: never
    on_failure: change

@cspotcode cspotcode marked this pull request as draft May 10, 2020 20:58
@cspotcode cspotcode requested a review from blakeembrey May 10, 2020 21:28
@cspotcode cspotcode marked this pull request as ready for review May 10, 2020 21:29
- run: npm run test-cov
- run: npm install ${{ matrix.typescript }} --force
- run: set +e ; npm run test-cov ; echo $? > tests-exit-code
- run: npm install -g coveralls@2 && cat ./coverage/lcov.info | coveralls
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, I was having so much trouble navigating the github actions docs.

Copy link
Member

Choose a reason for hiding this comment

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

It's been pretty challenging, but I've been using it in some private monorepos lately so got a bunch of first-hand experience (which seems to be the only way to learn).

@blakeembrey
Copy link
Member

@blakeembrey Are there environment variables that need to be passed to coveralls?

I can't recall ever having to do anything... But I found this: https://github.com/nickmerwin/node-coveralls#usage. We should probably just use this: https://github.com/coverallsapp/github-action.

@blakeembrey
Copy link
Member

I believe you can also grab github-token from ${{ github.token }} for the Coveralls GitHub Action.

@blakeembrey
Copy link
Member

Do we need to preserve notifications behavior?

It's not urgent, but if we can it's probably nice - I mostly disabled this across all repos due to the number of notifications I'd otherwise receive.

@github-actions
Copy link

Coverage Status

Coverage decreased (-45.3%) to 35.361% when pulling 710273d on ab/move-coverage-to-github-actions into a335834 on master.

@blakeembrey
Copy link
Member

@cspotcode We should also consider creating a "nightly" GitHub Action next that tests the latest TypeScript build. We have it currently set up on Travis CI, though I've mostly not kept up with the failures.

@cspotcode
Copy link
Collaborator Author

I'll look into a nightly test.

For notifications, I think that's configured on a user-by-user basis. At least I can't find anything that lets me configure in the workflow yml.
image
https://github.com/settings/notifications

@cspotcode
Copy link
Collaborator Author

@blakeembrey I think I have a nightly test set up correctly.

Do you know why it's saying coverage dropped so much? Also, how do you typically use the coverage results? Since it's for the emitted .js, I can't use the UI to visualize coverage.

@cspotcode
Copy link
Collaborator Author

Nevermind my question about dropping coverage; it must have been caused by the intentially failing test. Now coverage says it's good.

@cspotcode
Copy link
Collaborator Author

@blakeembrey This is ready for a final rubber stamp.

@blakeembrey
Copy link
Member

Also, how do you typically use the coverage results?

In this repo, I'm not sure since a lot of the tests run using the CLI - I've never actually double checked that we're measuring it correctly (pretty sure I wasn't). In general, I view it locally if it's well under what I expect. We could move it to properly measure coverage on TypeScript though, things have improved a lot since I originally set up ts-node.

@cspotcode cspotcode merged commit c24a768 into master May 10, 2020
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.

2 participants