Skip to content

Commit

Permalink
chore: update gh-action versions
Browse files Browse the repository at this point in the history
Signed-off-by: dntosas <[email protected]>
  • Loading branch information
dntosas committed Jul 17, 2024
1 parent ac5dd10 commit b1aa1a1
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 41 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Checkout code
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Run go fmt
run: make fmt
Expand All @@ -30,21 +30,21 @@ jobs:
run: make vet

- name: Run go lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.54.2
version: v1.59.1
args: --timeout 5m --enable revive,gofmt,exportloopref --exclude-use-default=false --modules-download-mode=vendor --build-tags integration

- name: Run go test
run: make test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: GO
fail_ci_if_error: true
files: ./cover.out
flags: unittests
name: codecov-umbrella
verbose: true
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# env_vars: GO
# fail_ci_if_error: true
# files: ./cover.out
# flags: unittests
# name: codecov-umbrella
# verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Checkout code
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GROUP = $(shell id -g)
PROJECT = "capi2argo-cluster-operator"
GOBUILD_OPTS = -ldflags="-s -w -X ${PROJECT}/cmd.Version=${VERSION} -X ${PROJECT}/cmd.CommitHash=${COMMIT}"
GO_IMAGE = "golang:1.22-alpine"
GO_IMAGE_CI = "golangci/golangci-lint:v1.54.2"
GO_IMAGE_CI = "golangci/golangci-lint:v1.59.1"
DISTROLESS_IMAGE = "gcr.io/distroless/static:nonroot"
IMAGE_TAG_BASE ?= "ghcr.io/dntosas/${PROJECT}"

Expand Down Expand Up @@ -39,7 +39,7 @@ vet: ## Run go vet against code.

.PHONY: lint
lint: ## Run golangci-lint against code.
golangci-lint run --enable gofmt,exportloopref --exclude-use-default=false --modules-download-mode=vendor --build-tags integration
golangci-lint run --enable revive,gofmt,exportloopref --exclude-use-default=false --modules-download-mode=vendor --build-tags integration

.PHONY: test
test: envtest ## Run go tests against code.
Expand Down
4 changes: 2 additions & 2 deletions charts/capi2argo-cluster-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 0.2.1
appVersion: 1.0.0
description: Capi-2-Argo Cluster Operator (CACO) converts ClusterAPI Cluster credentials into ArgoCD Cluster definitions and keep them synchronized.
home: https://github.com/dntosas/capi2argo-cluster-operator
keywords:
Expand All @@ -11,7 +11,7 @@ maintainers:
name: capi2argo-cluster-operator
sources:
- https://github.com/dntosas/capi2argo-cluster-operator
version: 0.2.1
version: 1.0.0
dependencies:
- name: common
repository: "https://charts.bitnami.com/bitnami"
Expand Down
4 changes: 2 additions & 2 deletions charts/capi2argo-cluster-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ replicaCount: 1
image:
registry: ghcr.io
repository: dntosas/capi2argo-cluster-operator
tag: v0.2.1
tag: v1.0.0
pullPolicy: Always
pullSecrets: []

Expand Down Expand Up @@ -64,7 +64,7 @@ containerSecurityContext:
capabilities:
drop:
- ALL

podSecurityContext:
enabled: true
fsGroup: 1001
Expand Down
34 changes: 17 additions & 17 deletions controllers/capi2argo_reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package controllers

import (
"context"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -32,47 +32,47 @@ var (
)

func TestControllers(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Capi2ArgoClusterOperator Controller Suite")
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Capi2ArgoClusterOperator Controller Suite")
}

var _ = BeforeSuite(func() {
By("bootstrapping test environment")
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))
var _ = ginkgo.BeforeSuite(func() {
ginkgo.By("bootstrapping test environment")
logf.SetLogger(zap.New(zap.WriteTo(ginkgo.GinkgoWriter), zap.UseDevMode(true)))

TestEnv = &envtest.Environment{}
Cfg, err := TestEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(Cfg).NotTo(BeNil())
gomega.Expect(err).NotTo(gomega.HaveOccurred())
gomega.Expect(Cfg).NotTo(gomega.BeNil())

//+kubebuilder:scaffold:scheme
K8sManager, err := ctrl.NewManager(Cfg, ctrl.Options{
// Host: "0.0.0.0",
Scheme: scheme.Scheme,
})
Expect(err).ToNot(HaveOccurred())
gomega.Expect(err).ToNot(gomega.HaveOccurred())

C2A = &Capi2Argo{
Client: K8sManager.GetClient(),
Log: TestLog,
Scheme: K8sManager.GetScheme(),
}
err = C2A.SetupWithManager(K8sManager)
Expect(err).ToNot(HaveOccurred())
gomega.Expect(err).ToNot(gomega.HaveOccurred())

Ctx, Cancel = context.WithCancel(context.TODO())
go func() {
defer GinkgoRecover()
defer ginkgo.GinkgoRecover()
err = K8sManager.Start(Ctx)
Expect(err).ToNot(HaveOccurred(), "failed to run manager")
gomega.Expect(err).ToNot(gomega.HaveOccurred(), "failed to run manager")
}()

K8sClient = K8sManager.GetClient()
Expect(K8sClient).ToNot(BeNil())
gomega.Expect(K8sClient).ToNot(gomega.BeNil())

}, 60)

var _ = AfterSuite(func() {})
var _ = ginkgo.AfterSuite(func() {})

func TestReconcile(t *testing.T) {
t.Parallel()
Expand Down Expand Up @@ -130,9 +130,9 @@ func TestReconcile(t *testing.T) {
t.Cleanup(func() {
time.Sleep(5 * time.Second)
Cancel()
By("tearing down the test environment")
ginkgo.By("tearing down the test environment")
err = TestEnv.Stop()
Expect(err).NotTo(HaveOccurred())
gomega.Expect(err).NotTo(gomega.HaveOccurred())
})
}

Expand Down

0 comments on commit b1aa1a1

Please sign in to comment.