Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 29 additions & 31 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,41 @@ on:
- main

jobs:

integration_test:
name: Integration test
strategy:
matrix:
go-version: [1.22.0]
go-version: [1.26.2]
platform: [ubuntu-22.04]

runs-on: ${{ matrix.platform }}

steps:

- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version: ${{ matrix.go-version }}
cache: false

- name: Checkout current branch
uses: actions/checkout@v4.1.6
with:
fetch-depth: '0'

- name: Get testenv image tag
run : |
export TEST_IMAGE="$(make get-envtest-image-tag -s)"
echo "TEST_IMAGE=${TEST_IMAGE}" >> ${GITHUB_ENV}

- name: Log in to the Docker Hub
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

# Build a new testenv image to use if and only if the Dockerfile or Makefile is changed in this PR
- name: Build image and push to Docker Hub
run : make envtest-image && make envtest-image-push

- name: Run integration tests
run : ./scripts/integration-test.sh
- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version: ${{ matrix.go-version }}
cache: false

- name: Checkout current branch
uses: actions/checkout@v4.1.6
with:
fetch-depth: "0"

- name: Get testenv image tag
run: |
export TEST_IMAGE="$(make get-envtest-image-tag -s)"
echo "TEST_IMAGE=${TEST_IMAGE}" >> ${GITHUB_ENV}

- name: Log in to the Docker Hub
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

# Build a new testenv image to use if and only if the Dockerfile or Makefile is changed in this PR
- name: Build image and push to Docker Hub
run: make envtest-image && make envtest-image-push

- name: Run integration tests
run: ./scripts/integration-test.sh
32 changes: 15 additions & 17 deletions .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2022 DigitalOcean
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -29,24 +29,23 @@ jobs:
name: Build and release image
strategy:
matrix:
go-version: [1.22.0]
go-version: [1.26.2]
platform: [ubuntu-22.04]

runs-on: ${{ matrix.platform }}

steps:

- name: Checkout current branch
uses: actions/checkout@v4.1.6

- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version: ${{ matrix.go-version }}
cache: false

- name: Build image
run : IMAGE=${{ env.IMAGE_NAME }} make build-image
run: IMAGE=${{ env.IMAGE_NAME }} make build-image

- name: Log in to the GitHub registry
uses: docker/login-action@v3.2.0
Expand All @@ -56,20 +55,19 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GitHub registry
run : |
export GITHUB_TAG=${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker tag ${{ env.IMAGE_NAME }} $GITHUB_TAG
docker push $GITHUB_TAG
run: |
export GITHUB_TAG=${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker tag ${{ env.IMAGE_NAME }} $GITHUB_TAG
docker push $GITHUB_TAG

- name: Log in to the Docker Hub
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKER_HUB_USER }}
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Push to Docker Hub
run : |
export DOCKER_TAG=${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker tag ${{ env.IMAGE_NAME }} $DOCKER_TAG
docker push $DOCKER_TAG

run: |
export DOCKER_TAG=${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker tag ${{ env.IMAGE_NAME }} $DOCKER_TAG
docker push $DOCKER_TAG
50 changes: 23 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2022 DigitalOcean
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -20,43 +20,39 @@ on:
- main

jobs:

go_test:
name: Test
strategy:
matrix:
go-version: [1.22.0]
go-version: [1.26.2]
platform: [ubuntu-22.04]

runs-on: ${{ matrix.platform }}

steps:
- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version: ${{ matrix.go-version }}
cache: false

- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version: ${{ matrix.go-version }}
cache: false

- name: Checkout current branch
uses: actions/checkout@v4.1.6

- name: gofmt
run : ./scripts/gofmt.sh

- name: Install Revive
run : go install github.com/mgechev/revive@v1.2.1
- name: Checkout current branch
uses: actions/checkout@v4.1.6

- name: Lint
run : revive -exclude vendor/... ./...
- name: gofmt
run: ./scripts/gofmt.sh

- name: Install
run : go install honnef.co/go/tools/cmd/staticcheck@v0.4.7
- name: Install Revive
run: go install github.com/mgechev/revive@v1.15.0

- name: Static check
run : ./scripts/static-check.sh
- name: Lint
run: revive -exclude vendor/... ./...

- name: Test
run : ./scripts/test.sh
- name: Install
run: go install honnef.co/go/tools/cmd/staticcheck@2026.1

- name: Static check
run: ./scripts/static-check.sh

- name: Test
run: ./scripts/test.sh
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ IMAGE ?= "${NAME}:$(GITCOMMIT)"
# Path to k8s-env-test image on Docker Hub
ENVTEST := digitalocean/k8s-env-test

K8S_VERSION := 1.30.11
ETCD_VERSION := 3.5.0
GO_VERSION := 1.22.0
K8S_VERSION := 1.32.13
ETCD_VERSION := 3.5.29
GO_VERSION := 1.26.2

ifeq ($(strip $(shell git status --porcelain 2>/dev/null)),)
GIT_TREE_STATE=clean
Expand Down
4 changes: 2 additions & 2 deletions client/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion client/clientset/versioned/fake/clientset_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading