-
Notifications
You must be signed in to change notification settings - Fork 223
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
Migrate Travis CI to Github Actions #108
base: master
Are you sure you want to change the base?
Conversation
.github/workflows/test.yml
Outdated
# events but only for the master branch | ||
on: | ||
pull_request: | ||
branches: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branches: is probably not necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
.github/workflows/test.yml
Outdated
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.11' # The Go version to download (if necessary) and use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use tip if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used this to install tip, there is no easy way to get tip version directly.
actions/setup-go#21
.github/workflows/test.yml
Outdated
# Run vet & lint on the code | ||
- name: Run vet & lint | ||
run: | | ||
go vet -x ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally these should be separate steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you don’t set -e, any failure won’t terminate the script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
- name: Run tests | ||
run: | | ||
go test -v ./... | ||
go test -covermode=count -coverprofile=profile.cov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all these are tests + ideally should be separate steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Update Github Action Test GH Action Test GH Action Update GH Action Update GH Action Update GH Action Update GH Action Update GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Test GH Action Update GH Action Update GH Action Update GH Action Update GH Action
If "tip" is really necessary I can update the action.
Sample Pull Request check: berabulut#1