Skip to content

chore(deps): update dependency go to v1.22.3 #1603

chore(deps): update dependency go to v1.22.3

chore(deps): update dependency go to v1.22.3 #1603

Workflow file for this run

name: Build, lint and test
on:
push:
branches:
- main
- renovate/**
pull_request:
jobs:
build:
name: Build integration for
runs-on: ubuntu-latest
strategy:
matrix:
goos: [ linux ]
goarch: [ amd64, arm64, arm ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build integration
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
make compile
chart-lint:
name: Helm chart Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: helm/chart-testing-action@v2.6.1
- name: Lint charts
run: ct --config .github/ct.yaml lint --debug
- name: Check for changed installable charts
id: list-changed
run: |
changed=$(ct --config .github/ct.yaml list-changed)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Run helm unit tests
if: steps.list-changed.outputs.changed == 'true'
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest --version=0.3.1
for chart in $(ct --config .github/ct.yaml list-changed); do
if [ -d "$chart/tests/" ]; then
helm unittest $chart
else
echo "No unit tests found for $chart"
fi
done
docker-build:
name: Build docker image for integration tests
runs-on: ubuntu-latest
timeout-minutes: 10
env:
DOCKER_BUILDKIT: '1'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build docker image
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
outputs: type=docker,dest=nri-kube-events.tar
platforms: |
linux/amd64
tags: e2e/nri-kube-events:test
- name: Upload Image
uses: actions/upload-artifact@v4
with:
name: nri-kube-events
path: nri-kube-events.tar
retention-days: 1
static-analysis:
name: Run all static analysis checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: newrelic/newrelic-infra-checkers@v1
with:
golangci-lint-config: golangci-lint-limited
# - name: Semgrep
# uses: returntocorp/semgrep-action@v1
# with:
# auditOn: push
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
continue-on-error: ${{ github.event_name != 'pull_request' }}
with:
only-new-issues: true
skip-pkg-cache: true
skip-build-cache: true
test:
name: Run unit tests
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Test
run: make test-unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@6d798873df2b1b8e5846dba6fb86631229fbcb17 # v4.4.0
with:
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-integration:
name: Run integration tests
runs-on: ubuntu-latest
needs: [ docker-build ]
timeout-minutes: 10
env:
DOCKER_BUILDKIT: '1'
strategy:
max-parallel: 5
fail-fast: false
matrix:
k8sVersion: [ "v1.24.17", "v1.25.13", "v1.26.8", "v1.27.5", "v1.28.3" ]
cri: [ containerd ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Setup Minikube
uses: manusa/actions-setup-minikube@v2.11.0
with:
minikube version: v1.33.1
kubernetes version: ${{ matrix.k8sVersion }}
driver: docker
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--container-runtime=${{ matrix.cri }}"
- name: Run integreation tests
run: make test-integration
- name: Download Image
uses: actions/download-artifact@v4
with:
name: nri-kube-events
- name: Load image for chart testing
run: |
minikube image load nri-kube-events.tar
minikube image ls
kubectl create ns ct
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: helm/chart-testing-action@v2.6.1
- name: Test install charts
run: ct install --namespace ct --config .github/ct.yaml --debug
- name: Test upgrade charts
run: ct install --namespace ct --config .github/ct.yaml --debug --upgrade