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

Feat test report #1244

Draft
wants to merge 40 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a2042f3
ground work
Dec 12, 2024
8fb48dc
feat: add sender rule for pipelines (#1206)
ecrupper Oct 25, 2024
a3b1bff
chore(lint): add struct tag align rule (#1216)
ecrupper Oct 25, 2024
2245376
chore(lint): address existing linter issues (#1218)
ecrupper Nov 4, 2024
5a1f403
enhance(build)!: add fork field for OIDC (#1221)
ecrupper Nov 20, 2024
9a5bf00
enhance(compiler): cache templates per compilation (#1224)
ecrupper Dec 3, 2024
58718a1
ground work
Dec 12, 2024
8e9cd8e
working admin endpoints for bucket management
Dec 17, 2024
3239b53
working admin endpoints for object operations
Dec 18, 2024
8a95775
all endpoints for storage
Jan 2, 2025
a4f29d0
some working test
Jan 7, 2025
41df509
working tests
Jan 8, 2025
86d822d
keys for test report step
Jan 17, 2025
83afd15
feat: deployment config for expected params and targets (#1214)
ecrupper Dec 18, 2024
8b5b79f
resolve conflicts with buildkite
Jan 17, 2025
9328ecd
feat: opt-in gh app integration (#1217)
plyr4 Dec 19, 2024
b16622f
chore(yaml): add go-yaml types package (#1225)
ecrupper Dec 23, 2024
3156794
resolve conflicts
Jan 17, 2025
57f8f9a
rebase
Jan 17, 2025
09da5df
enhance(yaml): allow for users to set version legacy for buildkite (#…
ecrupper Dec 26, 2024
114ae7b
refactor(db/build): drop source index, add event index (#1228)
wass3rw3rk Dec 27, 2024
fd16b7b
feat(repo)!: add pending approval timeout (#1227)
ecrupper Dec 30, 2024
68547d6
enhance(yaml): silent fix anchor merges in YAML maps (#1231)
ecrupper Dec 30, 2024
c7c1d0a
fix(webhook): use correct repo variable for enqueue (#1234)
ecrupper Dec 31, 2024
f43e2d1
feat(pipeline)!: add warnings to pipelines that use legacy YAML lib o…
ecrupper Jan 6, 2025
f1a98ac
feat: status endpoints (#1235)
plyr4 Jan 7, 2025
bf2313d
enhance(deploy): validate on CreateDeployment (#1236)
ecrupper Jan 8, 2025
9a532cf
enhance(metrics): include route specific queue length (#1237)
ecrupper Jan 9, 2025
9f13f97
chore(deps): update codecov/codecov-action action to v5 (#1222)
renovate[bot] Jan 10, 2025
3920eab
fix(deps): update module github.com/google/go-github/v65 to v68 (#1229)
renovate[bot] Jan 10, 2025
084fea3
chore: bump go (#1238)
wass3rw3rk Jan 10, 2025
52df828
fix(deployment): use Config instead of ConfigBackoff when fetching de…
ecrupper Jan 10, 2025
4eee25d
fix(build): use item build host (#1241)
ecrupper Jan 13, 2025
df21b7a
fix(build): ensure count/pagination links account for filter/query pa…
wass3rw3rk Jan 14, 2025
d24fd37
fix(yaml): improved messaging (#1243)
wass3rw3rk Jan 15, 2025
a051afa
keys for test report step
Jan 17, 2025
5254aad
resolve conflicts with buildkite
Jan 17, 2025
a138127
Merge branch 'main' into feat_test_report
timhuynh94 Jan 17, 2025
14660f5
mod tidy
Jan 17, 2025
05a09bb
fields for buildkite and ymal
Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
468 changes: 468 additions & 0 deletions api/admin/storage.go

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions api/types/storage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package types

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Missed header for check (goheader)


import "github.com/minio/minio-go/v7/pkg/lifecycle"

// Bucket is the API types representation of an object storage.
//
// swagger:model CreateBucket
type Bucket struct {
BucketName string `json:"bucket_name,omitempty"`
Options BucketOptions `json:"options,omitempty"`
LifecycleConfig lifecycle.Configuration `json:"life_cycle_config,omitempty"`
}

type BucketOptions struct {
Region string `json:"region,omitempty"`
ObjectLocking bool `json:"object_locking,omitempty"`
}

type Object struct {
ObjectName string `json:"object_name,omitempty"`
Bucket Bucket `json:"bucket,omitempty"`
FilePath string `json:"file_path,omitempty"`
}
214 changes: 214 additions & 0 deletions api/types/test-report/code_coverage_file.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
package test_report

// CodeCoverageFile is the API types representation of a code coverage file for a pipeline.
//
// swagger:model CodeCoverageFile
type CodeCoverageFile struct {
ID *int64 `json:"id,omitempty"`
CodeCoverageRun *CodeCoverageRun `json:"code_coverage_run,omitempty"`
CodeCoverageGroup *CodeCoverageGroup `json:"code_coverage_group,omitempty"`
CodeCoverageStats *CodeCoverageStats `json:"code_coverage_stats,omitempty"`
DirectoryName *string `json:"directory_name,omitempty"`
FileName *string `json:"file_name,omitempty"`
MissedLines *int `json:"missed_lines,omitempty"`
PartialLines *int `json:"partial_lines,omitempty"`
FilePath *string `json:"file_path,omitempty"`
}

// GetID returns the ID field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetID() int64 {
if c == nil || c.ID == nil {
return 0
}
return *c.ID
}

// SetID sets the ID field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetID(v int64) {
if c == nil {
return
}
c.ID = &v
}

// GetCodeCoverageRun returns the CodeCoverageRun field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetCodeCoverageRun() *CodeCoverageRun {
if c == nil || c.CodeCoverageRun == nil {
return new(CodeCoverageRun)
}
return c.CodeCoverageRun
}

// SetCodeCoverageRun sets the CodeCoverageRun field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetCodeCoverageRun(v *CodeCoverageRun) {
if c == nil {
return
}
c.CodeCoverageRun = v
}

// GetCodeCoverageGroup returns the CodeCoverageGroup field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetCodeCoverageGroup() *CodeCoverageGroup {
if c == nil || c.CodeCoverageGroup == nil {
return new(CodeCoverageGroup)
}
return c.CodeCoverageGroup
}

// SetCodeCoverageGroup sets the CodeCoverageGroup field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetCodeCoverageGroup(v *CodeCoverageGroup) {
if c == nil {
return
}
c.CodeCoverageGroup = v
}

// GetCodeCoverageStats returns the CodeCoverageStats field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetCodeCoverageStats() *CodeCoverageStats {
if c == nil || c.CodeCoverageStats == nil {
return new(CodeCoverageStats)
}
return c.CodeCoverageStats
}

// SetCodeCoverageStats sets the CodeCoverageStats field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetCodeCoverageStats(v *CodeCoverageStats) {
if c == nil {
return
}
c.CodeCoverageStats = v
}

// GetDirectoryName returns the DirectoryName field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetDirectoryName() string {
if c == nil || c.DirectoryName == nil {
return ""
}
return *c.DirectoryName
}

// SetDirectoryName sets the DirectoryName field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetDirectoryName(v string) {
if c == nil {
return
}
c.DirectoryName = &v
}

// GetFileName returns the FileName field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetFileName() string {
if c == nil || c.FileName == nil {
return ""
}
return *c.FileName
}

// SetFileName sets the FileName field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetFileName(v string) {
if c == nil {
return
}
c.FileName = &v
}

// GetMissedLines returns the MissedLines field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetMissedLines() int {
if c == nil || c.MissedLines == nil {
return 0
}
return *c.MissedLines
}

// SetMissedLines sets the MissedLines field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetMissedLines(v int) {
if c == nil {
return
}
c.MissedLines = &v
}

// GetPartialLines returns the PartialLines field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetPartialLines() int {
if c == nil || c.PartialLines == nil {
return 0
}
return *c.PartialLines
}

// SetPartialLines sets the PartialLines field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetPartialLines(v int) {
if c == nil {
return
}
c.PartialLines = &v
}

// GetFilePath returns the FilePath field.
//
// When the provided CodeCoverageFile type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageFile) GetFilePath() string {
if c == nil || c.FilePath == nil {
return ""
}
return *c.FilePath
}

// SetFilePath sets the FilePath field.
//
// When the provided CodeCoverageFile type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageFile) SetFilePath(v string) {
if c == nil {
return
}
c.FilePath = &v
}
99 changes: 99 additions & 0 deletions api/types/test-report/code_coverage_group.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package test_report

// CodeCoverageGroup is the API types representation of a group of code coverage.
//
// swagger:model CodeCoverageGroup
type CodeCoverageGroup struct {
ID *int64 `json:"id,omitempty"`
CodeCoverageRun *CodeCoverageRun `json:"code_coverage_run,omitempty"`
Name *string `json:"name,omitempty"`
CodeCoverageStats *CodeCoverageStats `json:"code_coverage_stats,omitempty"`
}

// GetID returns the ID field.
//
// When the provided CodeCoverageGroup type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageGroup) GetID() int64 {
if c == nil || c.ID == nil {
return 0
}
return *c.ID
}

// SetID sets the ID field.
//
// When the provided CodeCoverageGroup type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageGroup) SetID(v int64) {
if c == nil {
return
}
c.ID = &v
}

// GetCodeCoverageRun returns the CodeCoverageRun field.
//
// When the provided CodeCoverageGroup type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageGroup) GetCodeCoverageRun() *CodeCoverageRun {
if c == nil || c.CodeCoverageRun == nil {
return new(CodeCoverageRun)
}
return c.CodeCoverageRun
}

// SetCodeCoverageRun sets the CodeCoverageRun field.
//
// When the provided CodeCoverageGroup type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageGroup) SetCodeCoverageRun(v *CodeCoverageRun) {
if c == nil {
return
}
c.CodeCoverageRun = v
}

// GetName returns the Name field.
//
// When the provided CodeCoverageGroup type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageGroup) GetName() string {
if c == nil || c.Name == nil {
return ""
}
return *c.Name
}

// SetName sets the Name field.
//
// When the provided CodeCoverageGroup type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageGroup) SetName(v string) {
if c == nil {
return
}
c.Name = &v
}

// GetCodeCoverageStats returns the CodeCoverageStats field.
//
// When the provided CodeCoverageGroup type is nil, or the field within
// the type is nil, it returns a new CodeCoverageStats instance.
func (c *CodeCoverageGroup) GetCodeCoverageStats() *CodeCoverageStats {
if c == nil || c.CodeCoverageStats == nil {
return new(CodeCoverageStats)
}
return c.CodeCoverageStats
}

// SetCodeCoverageStats sets the CodeCoverageStats field.
//
// When the provided CodeCoverageGroup type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageGroup) SetCodeCoverageStats(v *CodeCoverageStats) {
if c == nil {
return
}
c.CodeCoverageStats = v
}
57 changes: 57 additions & 0 deletions api/types/test-report/code_coverage_run.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package test_report

// CodeCoverageRun is the API types representation of a code coverage run for a pipeline.
//
// swagger:model CodeCoverageRun
type CodeCoverageRun struct {
ID *int64 `json:"id,omitempty"`
TestRunPublicID *string `json:"test_run_public_id,omitempty"`
}

// GetID returns the ID field.
//
// When the provided CodeCoverageRun type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageRun) GetID() int64 {
if c == nil || c.ID == nil {
return 0
}
return *c.ID
}

// GetTestRunPublicID returns the TestRunPublicID field.
//
// When the provided CodeCoverageRun type is nil, or the field within
// the type is nil, it returns the zero value for the field.
func (c *CodeCoverageRun) GetTestRunPublicID() string {
if c == nil || c.TestRunPublicID == nil {
return ""
}
return *c.TestRunPublicID
}

// SetID sets the ID field.
//
// When the provided CodeCoverageRun type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageRun) SetID(v int64) {
// return if CodeCoverageRun type is nil
if c == nil {
return
}

c.ID = &v
}

// SetTestRunPublicID sets the TestRunPublicID field.
//
// When the provided CodeCoverageRun type is nil, it
// will set nothing and immediately return.
func (c *CodeCoverageRun) SetTestRunPublicID(v string) {
// return if CodeCoverageRun type is nil
if c == nil {
return
}

c.TestRunPublicID = &v
}
Loading
Loading