-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add CI for Go #77
Add CI for Go #77
Conversation
Does CI include linter? |
Yep, I added |
4286bf7
to
258fc6b
Compare
f34b737
to
40610b1
Compare
1d9c742
to
a9564f6
Compare
use std::ffi::c_void; | ||
|
||
#[no_mangle] | ||
pub extern "C" fn create_connection() -> *const c_void { |
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 needed to add some arbitrary code here so that lint-rust had something to run against. I tried only adding the copyright, with no actual code, but the lint-rust workflow failed, I think because it wants their to be logic in this file
) | ||
|
||
// TODO: Replace this test with real tests when glide client implementation is started | ||
func TestArbitraryLogic(t *testing.T) { |
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 also added this arbitrary test so that the unit test workflow had something to run against
package main | ||
|
||
import ( | ||
_ "github.com/DarkDrim/go-test-report" |
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.
Apparently this file is recommended to specify ci dependencies (ie dependencies that are not directly required by your code). These dependencies are specified here and in go.mod. If you remove this file the dependencies in go.mod are removed when you run go mod tidy
because go detects that they aren't directly required by your code. More info about this here
Couple related questions:
|
.github/workflows/go.yml
Outdated
ln -s /usr/bin/redis6-server /usr/bin/redis-server | ||
ln -s /usr/bin/redis6-cli /usr/bin/redis-cli | ||
|
||
- name: Install Go |
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.
Can't you use actions/setup-go
there?
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.
Maybe? I saw that Java uses setup-java for ubuntu/macos but not for amazon linux so I assumed setup-java did not work on amazon linux and that if it doesn't work for java that it wouldn't for go. But my assumption may be wrong
The CI workflow includes: