diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml new file mode 100644 index 00000000..cf54a761 --- /dev/null +++ b/.github/actions/setup/action.yaml @@ -0,0 +1,33 @@ +name: Setup +description: sets up helm lint and testing environment +inputs: + create-kind-cluster: # id of input + description: 'Whether or not to create a kind cluster during setup' + required: true + default: "false" +runs: + using: "composite" + steps: + - name: Set up Helm + uses: azure/setup-helm@v3.5 + with: + version: v3.9.0 + + - uses: actions/setup-python@v4 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.4.0 + + - name: Create kind cluster + uses: helm/kind-action@v1.5.0 + if: ${{ inputs.create-kind-cluster == 'true' }} + with: + node_image: kindest/node:v1.24.12 + + - name: Add Dependencies + shell: bash + run: | + helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts + helm repo add coralogix-charts-virtual https://cgx.jfrog.io/artifactory/coralogix-charts-virtual diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml new file mode 100644 index 00000000..4310003a --- /dev/null +++ b/.github/workflows/helm-test.yml @@ -0,0 +1,20 @@ +name: Otel Agent Helm Install Test + +on: + pull_request: + +jobs: + collector-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup + uses: ./.github/actions/setup + with: + create-kind-cluster: "true" + - name: Run chart-testing (install) + run: ct install --charts otel-agent/k8s-helm +