Skip to content

Commit

Permalink
Fix CI build (#4)
Browse files Browse the repository at this point in the history
* Fix CI

* Fix failing tests
  • Loading branch information
peterh-fernride authored Sep 10, 2024
1 parent 0baa058 commit 5908584
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/cpanato/github_actions_exporter
module github.com/fernride/github_actions_exporter

go 1.22

Expand Down
4 changes: 2 additions & 2 deletions internal/server/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ type WorkflowObserver interface {
CountWorkflowJobStatus(org, repo, status, conclusion, runnerGroup, workflowName, jobName, branch string)
CountWorkflowJobDuration(org, repo, status, conclusion, runnerGroup, workflowName, jobName, branch string, seconds float64)

ObserveWorkflowRunDuration(org, repo, workflow, conclusion, branch string, seconds float64)
CountWorkflowRunStatus(org, repo, status, conclusion, workflow, branch string)
ObserveWorkflowRunDuration(org, repo, branch, workflow, conclusion string, seconds float64)
CountWorkflowRunStatus(org, repo, branch, status, conclusion, workflow string)
}

var _ WorkflowObserver = (*PrometheusObserver)(nil)
Expand Down
2 changes: 1 addition & 1 deletion internal/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"github.com/cpanato/github_actions_exporter/internal/server"
"github.com/fernride/github_actions_exporter/internal/server"
"github.com/go-kit/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/workflow_metrics_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/http"
"strings"

"github.com/cpanato/github_actions_exporter/model"
"github.com/fernride/github_actions_exporter/model"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/google/go-github/v59/github"
Expand Down
10 changes: 5 additions & 5 deletions internal/server/workflow_metrics_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"testing"
"time"

"github.com/cpanato/github_actions_exporter/internal/server"
"github.com/fernride/github_actions_exporter/internal/server"
"github.com/go-kit/log"
"github.com/google/go-github/v59/github"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -457,9 +457,9 @@ func Test_GHActionExporter_HandleGHWebHook_WorkflowJobCompletedEvent_WithNoStart
org: org,
repo: repo,
branch: branch,
runnerGroup: runnerGroupName,
status: status,
conclusion: conclusion,
runnerGroup: runnerGroupName,
workflowName: workflowName,
jobName: jobName,
}, 50*time.Millisecond)
Expand Down Expand Up @@ -703,7 +703,7 @@ func NewTestPrometheusObserver(t *testing.T) *TestPrometheusObserver {
}
}

func (o *TestPrometheusObserver) ObserveWorkflowJobDuration(org, repo, branch, state, runnerGroup, workflowName, jobName string, seconds float64) {
func (o *TestPrometheusObserver) ObserveWorkflowJobDuration(org, repo, state, runnerGroup, workflowName, jobName, branch string, seconds float64) {
o.workFlowJobDurationObserved <- workflowJobObservation{
org: org,
repo: repo,
Expand All @@ -716,7 +716,7 @@ func (o *TestPrometheusObserver) ObserveWorkflowJobDuration(org, repo, branch, s
}
}

func (o *TestPrometheusObserver) CountWorkflowJobStatus(org, repo, branch, status, conclusion, runnerGroup, workflowName, jobName string) {
func (o *TestPrometheusObserver) CountWorkflowJobStatus(org, repo, status, conclusion, runnerGroup, workflowName, jobName, branch string) {
o.workflowJobStatusCounted <- workflowJobStatusCount{
org: org,
repo: repo,
Expand All @@ -729,7 +729,7 @@ func (o *TestPrometheusObserver) CountWorkflowJobStatus(org, repo, branch, statu
}
}

func (o *TestPrometheusObserver) CountWorkflowJobDuration(org, repo, branch, status, conclusion, runnerGroup, workflowName, jobName string, seconds float64) {
func (o *TestPrometheusObserver) CountWorkflowJobDuration(org, repo, status, conclusion, runnerGroup, workflowName, jobName, branch string, seconds float64) {
o.workflowJobDurationCounted <- workflowJobDurationCount{
org: org,
repo: repo,
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"syscall"

"github.com/alecthomas/kingpin/v2"
"github.com/cpanato/github_actions_exporter/internal/server"
"github.com/fernride/github_actions_exporter/internal/server"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/promlog"
Expand Down

0 comments on commit 5908584

Please sign in to comment.