Skip to content

Commit

Permalink
Merge branch 'master' into feature/bump-go
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkarlsen committed Feb 11, 2024
2 parents 510856d + 69a2b4c commit 3609b35
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 142 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
go-version-file: 'go.mod'

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
uses: golangci/golangci-lint[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
args: --timeout=10m

- name: Test and build image
run: |
make test docker-build
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4

- name: Push to GitHub Packages
run: |
Expand All @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
k8s: [ "v1.26.6", "v1.28.0" ]
k8s: [ "v1.26.13", "v1.29.1" ]
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
Expand All @@ -58,7 +58,7 @@ jobs:
go-version-file: 'go.mod'

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.9.0
with:
node_image: kindest/node:${{ matrix.k8s }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion controllers/githubactionrunner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
garov1alpha1 "github.com/evryfs/github-actions-runner-operator/api/v1alpha1"
"github.com/evryfs/github-actions-runner-operator/controllers/githubapi"
"github.com/go-logr/logr"
"github.com/google/go-github/v53/github"
"github.com/google/go-github/v58/github"
"github.com/redhat-cop/operator-utils/pkg/util"
"github.com/thoas/go-funk"
corev1 "k8s.io/api/core/v1"
Expand Down
24 changes: 12 additions & 12 deletions controllers/githubactionrunner_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package controllers

import (
"context"
"k8s.io/utils/ptr"
"testing"

"github.com/evryfs/github-actions-runner-operator/api/v1alpha1"
"github.com/google/go-github/v53/github"
"github.com/google/go-github/v58/github"
"github.com/gophercloud/gophercloud/testhelper"
"github.com/redhat-cop/operator-utils/pkg/util"
"github.com/stretchr/testify/mock"
Expand All @@ -15,7 +16,6 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/record"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
Expand Down Expand Up @@ -144,17 +144,17 @@ func TestGithubactionRunnerController(t *testing.T) {

// then scale down
mockResult = append(mockResult, &github.Runner{
ID: pointer.Int64(1),
Name: pointer.String(podList.Items[0].Name),
OS: pointer.String("Linux"),
Status: pointer.String("online"),
Busy: pointer.Bool(false),
ID: ptr.To[int64](1),
Name: ptr.To(podList.Items[0].Name),
OS: ptr.To("Linux"),
Status: ptr.To("online"),
Busy: ptr.To(false),
}, &github.Runner{
ID: pointer.Int64(2),
Name: pointer.String(podList.Items[1].Name),
OS: pointer.String("Linux"),
Status: pointer.String("online"),
Busy: pointer.Bool(false),
ID: ptr.To[int64](2),
Name: ptr.To(podList.Items[1].Name),
OS: ptr.To("Linux"),
Status: ptr.To("online"),
Busy: ptr.To(false),
})
mockAPI.On("GetRunners", org, repo, token).Return(mockResult, nil).Once()

Expand Down
2 changes: 1 addition & 1 deletion controllers/githubapi/runnerapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

prommetrics "github.com/deathowl/go-metrics-prometheus"
"github.com/google/go-github/v53/github"
"github.com/google/go-github/v58/github"
"github.com/gregjones/httpcache"
"github.com/palantir/go-githubapp/githubapp"
gometrics "github.com/rcrowley/go-metrics"
Expand Down
2 changes: 1 addition & 1 deletion controllers/podrunner_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/evryfs/github-actions-runner-operator/api/v1alpha1"
"github.com/google/go-github/v53/github"
"github.com/google/go-github/v58/github"
"github.com/redhat-cop/operator-utils/pkg/util"
"github.com/thoas/go-funk"
corev1 "k8s.io/api/core/v1"
Expand Down
8 changes: 4 additions & 4 deletions controllers/podrunner_types_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package controllers

import (
"k8s.io/utils/ptr"
"testing"
"time"

"github.com/evryfs/github-actions-runner-operator/api/v1alpha1"
"github.com/google/go-github/v53/github"
"github.com/google/go-github/v58/github"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
)

var podList = v1.PodList{
Expand Down Expand Up @@ -40,15 +40,15 @@ var podList = v1.PodList{
var runners = []*github.Runner{
{
ID: nil,
Name: pointer.String("name1"),
Name: ptr.To("name1"),
OS: nil,
Status: nil,
Busy: nil,
Labels: nil,
},
{
ID: nil,
Name: pointer.String("name2"),
Name: ptr.To("name2"),
OS: nil,
Status: nil,
Busy: nil,
Expand Down
57 changes: 29 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ go 1.22
require (
github.com/caitlinelfring/go-env-default v1.1.0
github.com/deathowl/go-metrics-prometheus v0.0.0-20221009205350-f2a1482ba35b
github.com/go-logr/logr v1.2.4
github.com/google/go-github/v53 v53.2.0
github.com/gophercloud/gophercloud v1.7.0
github.com/go-logr/logr v1.4.1
github.com/google/go-github/v58 v58.0.0
github.com/gophercloud/gophercloud v1.9.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.28.0
github.com/palantir/go-githubapp v0.18.0
github.com/onsi/gomega v1.31.1
github.com/palantir/go-githubapp v0.22.0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/redhat-cop/operator-utils v1.3.7
github.com/redhat-cop/operator-utils v1.3.8
github.com/stretchr/testify v1.8.4
github.com/thoas/go-funk v0.9.3
go.uber.org/zap v1.26.0
k8s.io/api v0.28.2
k8s.io/apimachinery v0.28.2
k8s.io/client-go v0.28.2
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.1
k8s.io/client-go v0.29.1
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/controller-runtime v0.15.2
)

Expand All @@ -31,11 +31,11 @@ require (
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.5.0 // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.9.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
Expand All @@ -50,7 +50,8 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v57 v57.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
Expand All @@ -61,8 +62,8 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
Expand All @@ -78,40 +79,40 @@ require (
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rs/zerolog v1.29.1 // indirect
github.com/rs/zerolog v1.31.0 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/shurcooL/githubv4 v0.0.0-20230424031643-6cea62ecd5a9 // indirect
github.com/shurcooL/githubv4 v0.0.0-20231126234147-1cffa1f02456 // indirect
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.9.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.27.2 // indirect
k8s.io/cli-runtime v0.28.2 // indirect
k8s.io/component-base v0.28.2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/kubectl v0.28.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 3609b35

Please sign in to comment.