Skip to content

ci: switch Travis to Github Actions #613

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

Merged
merged 1 commit into from
Feb 7, 2021
Merged

ci: switch Travis to Github Actions #613

merged 1 commit into from
Feb 7, 2021

Conversation

agnes512
Copy link
Contributor

@agnes512 agnes512 commented Jan 21, 2021

Notice that we were using mongodb 3.2 for Travis. That version runs into connection errors in GitHub action. This PR uses the latest stable version of mongodb (4.4) for Github action.

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Commit messages are following our guidelines

@agnes512 agnes512 changed the title ci: add GH action ci: add GH action and remove Travis CI integration Jan 21, 2021
@agnes512 agnes512 marked this pull request as ready for review January 21, 2021 22:05
Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

I have limited knowledge on GitHub Actions, but it LGTM. Please see my minor comments.

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Great job, @agnes512! I have one comment to address, PTAL 👇🏻

Considering that our CI is broken right now, I think it's ok to land this change as-is even if it's breaking code coverage, and then restore Coveralls integration in a follow-up pull request.

services:
- mongodb

after_success: npm run coverage
Copy link
Member

Choose a reason for hiding this comment

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

I believe this command is publishing code coverage data to https://coveralls.io/github/strongloop/loopback-connector-mongodb. Can you please preserve this step in the new GHA workflow too?

I think it should be enough to add a new step at the end of the file:

    - run: npm install
    - run: npm test
      env:
        CI: true
    - run: npm run coverage

@agnes512 agnes512 force-pushed the gh-action branch 2 times, most recently from 28c9299 to 0a6934f Compare January 22, 2021 20:18
@agnes512
Copy link
Contributor Author

agnes512 commented Jan 28, 2021

I was investigating adding coveralls to the workflow (run: npm run coverage doesn't work). But GitHub action seems disappeared 🤔 I am only seeing jenkins running. Not sure if I messed up something.

@agnes512
Copy link
Contributor Author

agnes512 commented Feb 3, 2021

@bajtos I tried to enable coveralls like https://coveralls.io/builds/32304908. But I don't know how to do it like Travis does. Seems like Travis has some repo token that coveralls.io would use. Not sure how this can be done with nyc + github action. I tried all possible solutions that I could fine but still have no luck.

Also, seems like the nyc report | coveralls still provides some coverage report (we had before as well):
image

and it has .nyc_output locally, which contains such reports:
image

Not sure if it's possible to have pages like coveralls.io for our case. Would you want me to invest more?

I also noticed that when we changed from Travis to Github action, we dropped the coveralls report for loopback-next. loopbackio/loopback-next#5110 Again, not sure how complicated it would be. But we might want to have the report for loopback-next. Please let me know if you have any concerns. Thanks.

@agnes512 agnes512 merged commit f647796 into master Feb 7, 2021
@delete-merged-branch delete-merged-branch bot deleted the gh-action branch February 7, 2021 22:13
@agnes512 agnes512 changed the title ci: add GH action and remove Travis CI integration ci: switch Travis to Github Actions Feb 8, 2021
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