Merge branch 'main' into gabedos/k8s-admin-events #1106
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Test | |
on: | |
push: | |
paths: | |
- 'test/datadog-operator/**' | |
- 'charts/datadog-operator/**' | |
pull_request: | |
paths: | |
- 'test/datadog-operator/**' | |
- 'charts/datadog-operator/**' | |
# Permission forced by repo-level setting; only elevate on job-level | |
permissions: | |
contents: read | |
# packages: read | |
env: | |
GO111MODULE: "on" | |
PROJECTNAME: "helm-charts" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.21 | |
id: go | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
with: | |
version: v3.14.0 | |
- name: Add Datadog Helm repo | |
run: helm repo add datadog https://helm.datadoghq.com && helm repo update | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: run Go tests | |
run: | | |
helm dependency build ./charts/datadog-operator | |
make unit-test-operator | |
integ-tests: | |
if: ${{github.event.pull_request.head.repo.full_name == github.repository }} | |
name: integ-tests | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
versions: | |
- k8s: v1.16.15 | |
kind: v0.15.0 | |
- k8s: v1.18.20 | |
kind: v0.17.0 | |
- k8s: v1.22.17 | |
kind: v0.22.0 | |
- k8s: v1.24.17 | |
kind: v0.22.0 | |
- k8s: v1.25.16 | |
kind: v0.22.0 | |
- k8s: v1.26.15 | |
kind: v0.22.0 | |
- k8s: v1.27.16 | |
kind: v0.22.0 | |
- k8s: v1.28.13 | |
kind: v0.22.0 | |
- k8s: v1.29.8 | |
kind: v0.22.0 | |
- k8s: v1.30.4 | |
kind: v0.22.0 | |
- k8s: v1.31.1 | |
kind: v0.22.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create K8s ${{ matrix.versions.k8s }} cluster with kind version ${{ matrix.versions.kind }} | |
uses: helm/kind-action@v1.10.0 | |
with: | |
version: ${{ matrix.versions.kind }} | |
node_image: kindest/node:${{ matrix.versions.k8s }} | |
cluster_name: operator-ci-${{ matrix.versions.k8s }} | |
config: .github/kind_config.yaml | |
- name: Add Cert Manager Helm repo | |
run: helm repo add jetstack https://charts.jetstack.io && helm repo update | |
- name: Add Datadog Helm repo | |
run: helm repo add datadog https://helm.datadoghq.com && helm repo update | |
- name: Run integ tests | |
env: | |
API_KEY: ${{ secrets.GO_INTEG_TEST_API_KEY }} | |
APP_KEY: ${{ secrets.GO_INTEG_TEST_APP_KEY }} | |
CLUSTER_NAME: operator-ci-${{ matrix.versions.k8s }} | |
K8S_VERSION: ${{ matrix.versions.k8s }} | |
run: | | |
kubectl cluster-info | |
kubectl get nodes | |
helm dependency build ./charts/datadog-operator | |
make integration-test |