-
Notifications
You must be signed in to change notification settings - Fork 1
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
ROX-9160: Add basic CI checks #12
Conversation
- substitute default branch variables (they are only used in workflow-templates)
- cleanup modules
cb302ed
to
8b47504
Compare
- add extra linebreaks
01a004f
to
22fb0bb
Compare
@@ -82,7 +83,8 @@ func (loader *Loader) readTestYAMLFiles() ([]string, error) { | |||
var testYAMLFiles []string | |||
var scannedDirs []string | |||
|
|||
dirs := append(loader.additionalTestDirs, loader.rootDir) | |||
dirs := []string{loader.rootDir} | |||
dirs = append(dirs, loader.additionalTestDirs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a remark that this is changing the semantics, as rootDir
now is the first element, not the last. However, I think that makes a lot of sense to do it this way anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, no code changes are required here. Please comment if I missed something.
pkg/framework/loader.go
Outdated
"os" | ||
"path/filepath" | ||
"strings" | ||
|
||
"k8s.io/utils/strings/slices" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line. The problem with goimports
is that it sees to mostly preserve blank lines in import blocks. We have a hand-rolled script to avoid this in the stackrox
repo, but that is very brittle and I would like to avoid porting it over. So for now we have to make do with avoiding multiple blocks manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line removed and imports were rearranged.
.github/workflows/ci.yaml
Outdated
branches: [ main ] | ||
|
||
jobs: | ||
build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should rather be called test
? There's no building happening here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Renamed.
Adding basic CI for: