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

CI for tests/releases #49

Merged
merged 8 commits into from
Oct 25, 2022
Merged

CI for tests/releases #49

merged 8 commits into from
Oct 25, 2022

Conversation

miki725
Copy link
Contributor

@miki725 miki725 commented Oct 24, 2022

this PR:

  • adds CI for running tests (both running tool and unit tests)
  • adds CI to make releases which should publish multiple pre-built go binaries
  • removes version.txt so that CI automatically populates it both for binary distributions as well as via goreleaser
  • optimizes Dockerfile to create smallest possible image just based on alpine+binary

@miki725 miki725 marked this pull request as ready for review October 24, 2022 20:22
@miki725 miki725 changed the title adding test-org CI + --noServer flag CI for tests/releases Oct 24, 2022
Comment on lines +28 to +39
// inspired from
// https://github.com/mvdan/sh/blob/6ba49e2c622e3f56330f4de6238a390f395db2d8/cmd/shfmt/main.go#L181-L192
if info, ok := debug.ReadBuildInfo(); ok && version == "(devel)" {
mod := &info.Main
if mod.Replace != nil {
mod = mod.Replace
}
if mod.Version != "" {
version = mod.Version
}
}
return version
Copy link
Contributor Author

Choose a reason for hiding this comment

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

➜ go install -v github.com/crashappsec/github-analyzer/cmd/github-analyzer@6dcfd30284c0e7593f98b14d303936321cabb7aa
go: downloading github.com/crashappsec/github-analyzer v0.1.4-pre-alpha.0.20221024225143-6dcfd30284c0
github.com/crashappsec/github-analyzer/pkg/config
github.com/crashappsec/github-analyzer/pkg/issue/category
github.com/crashappsec/github-analyzer/pkg/issue/resource
github.com/crashappsec/github-analyzer/pkg/issue/tags
github.com/crashappsec/github-analyzer/pkg/issue/severity
github.com/crashappsec/github-analyzer/pkg/issue
github.com/crashappsec/github-analyzer/pkg/log
github.com/crashappsec/github-analyzer/pkg/github/types
github.com/crashappsec/github-analyzer/pkg/futils
github.com/crashappsec/github-analyzer/pkg/github/utils
github.com/crashappsec/github-analyzer/pkg/scraping
github.com/crashappsec/github-analyzer/pkg/github/repo
github.com/crashappsec/github-analyzer/pkg/github/org
github.com/crashappsec/github-analyzer/pkg/github/auditor
github.com/crashappsec/github-analyzer/pkg/output/html
github.com/crashappsec/github-analyzer/cmd/github-analyzer

➜ github-analyzer --version
v0.1.4-pre-alpha.0.20221024225143-6dcfd30284c0

🎉 (note the commit was not built with version info via Makefile)

@nettrino nettrino merged commit 7f344c7 into main Oct 25, 2022
@nettrino nettrino deleted the tests branch October 25, 2022 06:56
@nettrino nettrino mentioned this pull request Oct 25, 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.

2 participants