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

Setup Go builds and tests in the CI #107

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Setup Go builds and tests in the CI #107

merged 5 commits into from
Oct 11, 2023

Conversation

torives
Copy link
Contributor

@torives torives commented Sep 29, 2023

This PR adds new steps to build and test Go code and a new workflow to format and lint it. I've added a single GraphQLService test to ensure the CI is running tests. If you feel there's an opportunity to write more, let me know and I'll gladly do it.

Example runs:

Closes #108

@torives torives added the no changelog PRs that don't require changes in changelog label Sep 29, 2023
@torives torives self-assigned this Sep 29, 2023
@torives torives force-pushed the feat/go-ci branch 7 times, most recently from e6780e0 to 95cfcf9 Compare October 3, 2023 17:32
@torives torives requested a review from a team October 3, 2023 17:38
@torives torives marked this pull request as ready for review October 3, 2023 17:39
Copy link
Contributor

@gligneul gligneul left a comment

Choose a reason for hiding this comment

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

Looks great! Just minor comments.

.github/workflows/build.yml Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
internal/pkg/services/graphql-service_test.go Outdated Show resolved Hide resolved
internal/pkg/services/graphql-service_test.go Outdated Show resolved Hide resolved
internal/pkg/services/graphql-service_test.go Outdated Show resolved Hide resolved
internal/pkg/services/graphql-service_test.go Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
gligneul
gligneul previously approved these changes Oct 3, 2023
@gligneul gligneul changed the base branch from next to main October 4, 2023 13:28
@gligneul gligneul dismissed their stale review October 4, 2023 13:28

The base branch was changed.

gligneul
gligneul previously approved these changes Oct 4, 2023
@torives
Copy link
Contributor Author

torives commented Oct 6, 2023

I've simplified the assess-go-code-quality job as I found out the linter had a gofmt option, so I removed the extra step. Also added a few more linters:

exhaustive: check exhaustiveness of enum switch statements
goconst: Finds repeated strings that could be replaced by a constant
godox: Tool for detection of FIXME, TODO and other comment keywords
gomnd: An analyzer to detect magic numbers.
lll: Reports long lines
misspell: Finds commonly misspelled English words in comments

gligneul
gligneul previously approved these changes Oct 6, 2023
@marcelstanley marcelstanley self-requested a review October 9, 2023 17:53
@torives torives removed the no changelog PRs that don't require changes in changelog label Oct 9, 2023
@torives
Copy link
Contributor Author

torives commented Oct 9, 2023

I've added new changelog entries for the changes in this PR. I promise this is the last review request 😅

CHANGELOG.md Outdated Show resolved Hide resolved
The file was renamed in commit fb059d but the workflow wasn't updated accordingly
@torives torives merged commit fa10cc1 into main Oct 11, 2023
6 checks passed
@torives torives deleted the feat/go-ci branch October 11, 2023 14:27
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.

Setup the CI to build and test Go projects
4 participants