Skip to content

Misc CI improvements#3001

Merged
EmilienM merged 10 commits intogophercloud:masterfrom
stephenfin:ci-improvements
May 27, 2024
Merged

Misc CI improvements#3001
EmilienM merged 10 commits intogophercloud:masterfrom
stephenfin:ci-improvements

Conversation

@stephenfin
Copy link
Copy Markdown
Contributor

@stephenfin stephenfin commented Mar 20, 2024

This started out as a series to add a go vet task to our CI jobs but transformed into a much larger PR to fix complaints I had with out current CI process 🙂.

The main change here is modify our tests so that we do not need so many wrappers around go test. This means making consistent use of conditional compilation directives to skip integration tests when running e.g. go test ./... and adding helper utilities to skip tests that rely on non-standard extensions or deployment configuration. The end result is that it should be possible to mostly use go test without wrappers going forward (though the wrappers are kept for now).

Please look at the individual commits for my rationale behind each change.

@github-actions github-actions bot added the semver:patch No API change label Mar 20, 2024
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 20, 2024

Coverage Status

coverage: 78.696%. remained the same
when pulling f2c3732 on stephenfin:ci-improvements
into 571ae75 on gophercloud:master.

@github-actions github-actions bot added semver:patch No API change and removed semver:patch No API change labels Mar 21, 2024
@github-actions github-actions bot added semver:patch No API change and removed semver:patch No API change labels Mar 21, 2024
@github-actions github-actions bot added semver:patch No API change and removed semver:patch No API change labels Mar 21, 2024
stephenfin added 10 commits May 23, 2024 14:41
This has not been used since we migrated to Travis.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
...to ensure we set the GOFLAGS correctly.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Well, mostly consistent: the acceptancetest script needs some special
treatment due to DevStack being weird.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
I'm guessing this was here to ensure we respected the exit code of the
'go test' invocation. We now do this through the appropriate use of
'set' so we no longer need to use 'exec'.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We now use 'go vet' in CI, which includes import checks. Since we don't
want to *fix* these failures in CI - merely report them - this is a
better choice. Drop 'goimports' in favour of 'gofmt'.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
I often see failing "unit tests" only to discover the actual failures
are linter related. Move these linter jobs to a separate workflow to
avoid this confusion going forward.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is already run as part of the 'unit' workflow.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Now that we skip tests that require optional features or extensions, we
can use standard module discovery rather than a glob of bash to run our
tests.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This isn't necessary since Go 1.16 [1].

[1] https://maelvls.dev/go111module-everywhere/

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@github-actions github-actions bot added semver:patch No API change and removed semver:patch No API change labels May 23, 2024
@stephenfin stephenfin mentioned this pull request May 23, 2024
Copy link
Copy Markdown
Contributor

@EmilienM EmilienM left a comment

Choose a reason for hiding this comment

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

nice work!

@EmilienM EmilienM merged commit 1405b4d into gophercloud:master May 27, 2024
@stephenfin stephenfin deleted the ci-improvements branch May 28, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch No API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants