Align all env variables for cluster management in all languages #56
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: pgx(go) cluster management tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'go/cluster_management/**' | |
| - '.github/workflows/go-cm-integ-tests.yml' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - 'go/cluster_management/**' | |
| - '.github/workflows/go-cm-integ-tests.yml' | |
| # Give us a button to allow running the workflow on demand for testing. | |
| workflow_dispatch: | |
| inputs: | |
| tags: | |
| description: 'Manual Workflow Run' | |
| required: false | |
| type: string | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| # Explicitly set permissions, following the principle of least privilege | |
| actions: read | |
| checks: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.23.2' | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.GO_IAM_ROLE }} | |
| aws-region: us-east-1 | |
| - name: echo-default-env-variables | |
| run: | | |
| echo "Home: ${HOME}" | |
| echo "GITHUB_WORKFLOW: ${GITHUB_WORKFLOW}" | |
| echo "GITHUB_ACTIONS: ${GITHUB_ACTIONS}" | |
| echo "GITHUB_ACTOR: ${GITHUB_ACTOR}" | |
| echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}" | |
| echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}" | |
| echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}" | |
| echo "GITHUB_RUN_ID: ${GITHUB_RUN_ID}" | |
| echo "GITHUB_SHA: ${GITHUB_SHA}" | |
| echo "GITHUB_REF: ${GITHUB_REF}" | |
| echo "GITHUB_RUN_NUMBER: ${GITHUB_RUN_NUMBER}" | |
| - name: Build & Run Create Multi region | |
| working-directory: ./go/cluster_management/cmd/create_multi_region | |
| run: | | |
| go env -w GOPROXY=direct | |
| go test | |
| - name: Build & Run Create Single region | |
| working-directory: ./go/cluster_management/cmd/create_single_region | |
| run: | | |
| go env -w GOPROXY=direct | |
| go test | |
| - name: Build & Run Get Cluster | |
| working-directory: ./go/cluster_management/cmd/get_cluster | |
| run: | | |
| go env -w GOPROXY=direct | |
| go test | |
| - name: Build & Run Update Cluster | |
| working-directory: ./go/cluster_management/cmd/update_cluster | |
| run: | | |
| go env -w GOPROXY=direct | |
| go test | |
| - name: Build & Run Delete Single region | |
| working-directory: ./go/cluster_management/cmd/delete_single_region | |
| run: | | |
| go env -w GOPROXY=direct | |
| go test | |
| - name: Build & Run Delete Multi region | |
| working-directory: ./go/cluster_management/cmd/delete_multi_region | |
| run: | | |
| go env -w GOPROXY=direct | |
| go test | |
| concurrency: | |
| # Ensure only 1 job mutates clusters in this account at a time. | |
| group: ${{ github.workflow }} | |
| cleanup: | |
| if: always() | |
| needs: build | |
| uses: ./.github/workflows/clean-clusters.yml | |
| with: | |
| aws_region: 'us-east-1' | |
| secrets: | |
| AWS_IAM_ROLE: ${{ secrets.GO_IAM_ROLE }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| concurrency: | |
| # Ensure only 1 job mutates clusters in this account at a time. | |
| group: ${{ github.workflow }} |