Minor refactoring around the build/test infrastructure by vdye · Pull Request #8 · git-ecosystem/git-bundle-server · GitHub
Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Minor refactoring around the build/test infrastructure#8

Merged
vdye merged 4 commits intomainfrom
vdye/test-setup
Jan 6, 2023
Merged

Minor refactoring around the build/test infrastructure#8
vdye merged 4 commits intomainfrom
vdye/test-setup

Conversation

@vdye
Copy link
Copy Markdown
Collaborator

@vdye vdye commented Jan 5, 2023

These commits help the repository better align with Go's project layout standards, add basic unit test execution to CI, and clean up some miscellaneous warnings.

The changes in this PR don't do much on their own, but merging them ahead of new feature development (e.g. git-bundle-server web-server) helps avoid mixing overarching infrastructure changes with feature-specific implementation/testing in future PRs.

vdye added 4 commits December 20, 2022 17:17
Update 'actions/checkout' version from 2 to 3 to address the Node 12
deprecation warning.

Signed-off-by: Victoria Dye <vdye@github.com>
The 'git-bundle-server' repository is checked out to 'src/git-bundle-server'
in anticipation of future dependencies (e.g., Git) being checked out to
parallel 'src' directories for use in integration tests.

The initial implementation of this workflow included explicit specification
of the 'GOPATH' for both 'go build' and 'go vet'; this is not necessary, so
remove it. Additionally, add a note about how the upcoming '-C' option
should remove the need for an explicit '-C' in each build step.

Signed-off-by: Victoria Dye <vdye@github.com>
The Go project recommends single-module repositories over multi-module
wherever possible [1]; multi-module setups seem to be most useful when they
represent separately-versioned and released projects living within the same
repository (further analysis in [2]). Additionally, there is currently no
convenient way to test all modules in a 'go.work' file (see [3]).

Due to the factors listed, convert repository from multi- to single-module.

[1] https://github.com/golang/go/wiki/Modules#should-i-have-multiple-modules-in-a-single-repository
[2] https://medium.com/compass-true-north/catching-up-with-the-world-go-modules-in-a-monorepo-c3d1393d6024
[3] golang/go#50745

Signed-off-by: Victoria Dye <vdye@github.com>
Add step to unit test all packages in the repository. At the moment, no unit
tests exist, so tests always pass.

Signed-off-by: Victoria Dye <vdye@github.com>
@vdye vdye self-assigned this Jan 5, 2023
Copy link
Copy Markdown
Collaborator

@ldennington ldennington left a comment

Choose a reason for hiding this comment

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

This looks great and was super easy to review. The only small suggestion I have is linking to a successful workflow run with your changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm unfamiliar with the ./... syntax, but I like how it cleans this up!

Copy link
Copy Markdown
Collaborator

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning up all these things with links to the Go standards that inform them.

Comment thread README.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Interesting. I did not know that a single module could generate multiple executables. TIL.

@vdye vdye merged commit 9429f14 into main Jan 6, 2023
@vdye vdye deleted the vdye/test-setup branch January 6, 2023 15:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants