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

Update CI to handle submodules. #362

Merged
merged 3 commits into from Nov 26, 2022
Merged

Conversation

This renames the variables in the script that runs tests against all
modules to better reflect reality as of the latest versions of Go.

In particular, instead of referring to `ROOTPATH`, it now uses `ROOTPKG`
to better indicate that it is the name of root package as opposed to a
file path to it.
`go test $ROOTPATH/...` runs all tests in the root module, and all tests in
submodules, so there is no need to run `go test` in the loop which
descends into submodule directories. Doing this actually causes each
test file to be run twice because the first iteration of the loop *is* the root
module, and thus all tests.

Only the linter needs to be invoked from each module directory.
Use run_tests.sh in CI because the official golangci-lint GitHub action does not handle submodules.
@jholdstock jholdstock merged commit 68047dc into decred:master Nov 26, 2022
@jholdstock jholdstock deleted the runtests branch September 20, 2023 08:23
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.

None yet

2 participants