Add linting and tests to Github Actions#243
Merged
rubenv merged 4 commits intorubenv:masterfrom Jun 5, 2023
Merged
Conversation
golang.org/x/sys added `unsafe.Slice`, but it requires go1.17 or greater. This pins the package to an earlier version and fixes the build.
Contributor
Author
|
You can see an example run of the proposed workflows here, on this PR (same branch, just opened as a PR against my fork so that the workflow has permissions to run) peterldowns#1 https://github.com/peterldowns/sql-migrate/actions/runs/5136897251
|
Owner
|
Oh thank you very much! Once Travis died I never got round to properly adding CI again. This is great. |
Contributor
Author
|
@rubenv you're welcome, I'm happy that I was able to contribute something useful :) If you run into any problems with it, please just tag me or send me an email and I can try to help out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

While I was working on #242 I was surprised to find a lack of automated testing. If you'd like, this PR sets up CI on Github Actions and adds some linting rules, too. I think switching to Github Actions will make it easier for people to contribute and make sure they're not breaking anything, especially for older versions of golang. Hopefully it will make your life easier as a maintainer, too.
If you are not interested, no problem, please feel free to close the PR.
make lint,make test, andmake buildgo buildandgo testfor golang version 1.13-1.20golangci-lintandgo mod tidyand makes sure there were not any changes detectedgolang.org/x/sys, which as of recent versions usesunsafe.Slicewhich was introduced with go1.17.