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

ROX-9160: Add basic CI checks #12

Merged
merged 6 commits into from
Feb 2, 2022
Merged

ROX-9160: Add basic CI checks #12

merged 6 commits into from
Feb 2, 2022

Conversation

kovayur
Copy link
Contributor

@kovayur kovayur commented Jan 31, 2022

Adding basic CI for:

  • build
  • test
  • lint

@kovayur kovayur linked an issue Feb 1, 2022 that may be closed by this pull request
- substitute default branch variables (they are only used in workflow-templates)
@kovayur kovayur marked this pull request as ready for review February 1, 2022 11:57
- add extra linebreaks
@@ -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...)
Copy link
Contributor

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.

Copy link
Contributor Author

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.

"os"
"path/filepath"
"strings"

"k8s.io/utils/strings/slices"

Copy link
Contributor

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.

Copy link
Contributor Author

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.

branches: [ main ]

jobs:
build:
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. Renamed.

@kovayur kovayur merged commit ba54bc7 into main Feb 2, 2022
@kovayur kovayur deleted the yury/ROX-9160-add-basic-ci branch February 2, 2022 14:43
misberner pushed a commit that referenced this pull request Feb 3, 2022
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.

Add basic CI to check style and unit tests
3 participants