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

TravisCI: Test and lint latest version modules. #1776

Merged
merged 3 commits into from
Jun 27, 2019

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jun 27, 2019

The current approach of the CI tests of specifying the path to the directory that contains the module only tests version 1 of the module despite there being newer version available. The same is true for the lints.

This resolves the test portion by obtaining a list of all modules required by the root go.mod file and providing the entire module path, which includes the version, to the go test command instead of the
directory.

Unfortunately, the linter does not recognize full module paths, however it will lint the latest module version from within the module directory itself, so this resolves the linting case by stripping the full module path and version down to the directory and changing into the directory to perform the lint checks.

It also contains two additional commits which correct newly discovered lint errors discovered by running them against the new version modules and to add requires for newer module versions that are not yet fully integrated to the main go.mod file along with a new file with a build tag to ignore it which imports those modules to prevent go mod tidy from removing the otherwise unused entries.

@davecgh davecgh added this to the 1.5.0 milestone Jun 27, 2019
@davecgh davecgh force-pushed the ci_improvements branch 4 times, most recently from a874fba to 97df42e Compare June 27, 2019 01:19
Copy link
Member

@jrick jrick left a comment

Choose a reason for hiding this comment

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

ok, but i would like to see vet-only linters used eventually.

davecgh added 2 commits June 26, 2019 20:21
The current approach of the CI tests of specifying the path to the
directory that contains the module only tests version 1 of the module
despite there being newer version available.  The same is true for the
lints.

This resolves the test portion by obtaining a list of all modules
required by the root go.mod file and providing the entire module path,
which includes the version, to the go test command instead of the
directory.

Unfortunately, the linter does not recognize full module paths, however
it will lint the latest module version from within the module directory
itself, so this resolves the linting case by stripping the full module
path and version down to the directory and changing into the directory
to perform the lint checks.
This adds requires for newer module versions that are not yet fully
integrated to the main go.mod file and a new file with a build tag
to ignore it which imports those modules to prevent go mod tidy from
removing the otherwise unused entries.
@davecgh davecgh merged commit 3203401 into decred:master Jun 27, 2019
@davecgh davecgh deleted the ci_improvements branch June 27, 2019 01:34
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.

2 participants