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

ci: migrate from Travis CI to GitHub Actions #62

Merged
merged 3 commits into from
Aug 24, 2022

Conversation

agilgur5
Copy link
Contributor

@agilgur5 agilgur5 commented Aug 13, 2022

Summary

Migrate CI from Travis to GitHub Actions, ensure tests run on macOS

Details

  • Travis CI is only pseudo-free after the .org -> .com merge

  • GH Actions are actually free for OSS / public repos

    • and also offer a decent level of composability that's resulted in a huge surge in reusable community Actions (vs. CircleCI orbs etc haven't had nearly as much adoption)
    • and I've had a mostly great experience on them so far as well
  • add a matrix for OSes and different Go versions too

    • currently only using one Go version (as it was on Travis), but can add more later
    • currently only testing latest Ubuntu and macOS (as it was on Travis), but can add more versions and OSes later
      • note that tests fail on Windows right now (due to the shell?)
  • check for $RUNNER_OS instead of $TRAVIS_OS_NAME now

    • update the commented out "Debug" step to conditionally run on macOS as well

fix: make get_docopts work on macOS

  • tests were failing on macOS b/c sha256sum doesn't exist
    • only use the third arg in the workaround as it doesn't support flags

Testing

See CI success in my branch

Future Work

Will want to rename the travis directory to something like ci instead. I didn't do it in this PR as renames require a few changes and are easier to track in Git as a single commit -- I can do that in a separate PR after this is merged

- Travis CI is only _pseudo_-free after the .org -> .com merge
  - c.f. https://travis-ci.community/t/org-com-migration-unexpectedly-comes-with-a-plan-change-for-oss-what-exactly-is-the-new-deal/10567

- GH Actions are _actually_ free for OSS / public repos
  - and also offer a decent level of composability that's resulted in a huge surge in reusable community Actions (vs. CircleCI orbs etc haven't had nearly as much adoption)
  - and I've had a mostly great experience on them so far as well

- add a matrix for OSes and different Go versions too
  - currently only using one Go version (as it was on Travis), but can add more later
  - currently only testing latest Ubuntu and macOS (as it was on Travis), but can add more versions and OSes later
    - note that tests fail on Windows right now (due to the shell?)

- check for `$RUNNER_OS` instead of `$TRAVIS_OS_NAME` now
  - c.f. https://docs.github.com/en/actions/learn-github-actions/environment-variables
  - update the commented out "Debug" step to conditionally run on macOS as well
- tests failing on macOS b/c `sha256sum` doesn't exist
  - only use the third arg in the workaround as it doesn't support flags
@agilgur5
Copy link
Contributor Author

Hmm, I'm guessing this has to be approved before CI runs on the PR? (per newer GitHub security features, and as this is the first workflow created and this is my first PR here, I think?)

@Sylvain303
Copy link
Collaborator

Seems good, lets merge that.

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.

travis.org seems gone, we need to find something else?
2 participants