Install cluster variations as part of CI. #416
Workflow file for this run
This file contains hidden or 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: Lint and Unit Test Charts | |
| on: pull_request | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| cassandra: | |
| image: cassandra:4.1 | |
| env: | |
| CASSANDRA_CLUSTER_NAME: test-cluster | |
| CASSANDRA_DC: dc1 | |
| CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch | |
| ports: | |
| - 9042:9042 | |
| options: >- | |
| --health-cmd "cqlsh -e 'describe cluster'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 30 | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_DB: testdb | |
| POSTGRES_USER: temporal | |
| POSTGRES_PASSWORD: temporal | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| elasticsearch: | |
| image: elasticsearch:8.11.0 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: false | |
| ES_JAVA_OPTS: -Xms512m -Xmx512m | |
| ports: | |
| - 9200:9200 | |
| options: >- | |
| --health-cmd "curl -f http://localhost:9200/_cluster/health || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4.2.0 | |
| with: | |
| version: v3.14.4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| check-latest: true | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@v2.6.1 | |
| - name: Run chart-testing (lint) | |
| run: ct lint --check-version-increment=false --target-branch v1 | |
| - name: Install helm-unittest | |
| run: helm plugin install https://github.com/helm-unittest/helm-unittest.git | |
| - name: Run helm-unittest | |
| working-directory: charts/temporal | |
| run: helm unittest . | |
| - name: Create kind cluster | |
| uses: helm/kind-action@v1.13.0 | |
| - name: Get Docker host gateway IP | |
| id: docker | |
| run: | | |
| HOST_IP=$(docker network inspect bridge -f '{{range .IPAM.Config}}{{.Gateway}}{{end}}') | |
| echo "host_ip=$HOST_IP" >> $GITHUB_OUTPUT | |
| echo "Docker host IP: $HOST_IP" | |
| - name: Create Kubernetes services and endpoints | |
| run: | | |
| HOST_IP="${{ steps.docker.host_ip }}" | |
| kubectl create service clusterip cassandra --tcp=9042:9042 --clusterip=None | |
| cat <<EOF | kubectl apply -f - | |
| apiVersion: v1 | |
| kind: Endpoints | |
| metadata: | |
| name: cassandra | |
| namespace: default | |
| subsets: | |
| - addresses: | |
| - ip: ${HOST_IP} | |
| ports: | |
| - port: 9042 | |
| protocol: TCP | |
| EOF | |
| kubectl create service clusterip postgres --tcp=5432:5432 --clusterip=None | |
| cat <<EOF | kubectl apply -f - | |
| apiVersion: v1 | |
| kind: Endpoints | |
| metadata: | |
| name: postgres | |
| namespace: default | |
| subsets: | |
| - addresses: | |
| - ip: ${HOST_IP} | |
| ports: | |
| - port: 5432 | |
| protocol: TCP | |
| EOF | |
| kubectl create service clusterip elasticsearch --tcp=9200:9200 --clusterip=None | |
| cat <<EOF | kubectl apply -f - | |
| apiVersion: v1 | |
| kind: Endpoints | |
| metadata: | |
| name: elasticsearch | |
| namespace: default | |
| subsets: | |
| - addresses: | |
| - ip: ${HOST_IP} | |
| ports: | |
| - port: 9200 | |
| protocol: TCP | |
| EOF | |
| - name: Run chart-testing (install) | |
| run: ct install --target-branch v1 |