chore(deps): runtime go runtime go1.23.1 → go1.26.1 [src/product-management-service/src/product-api] #239
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: Deploy Product Management Service | |
| on: | |
| push: | |
| paths: | |
| - src/product-management-service/** | |
| branches: | |
| - "main" | |
| pull_request: | |
| paths: | |
| - src/product-management-service/** | |
| branches: | |
| - "main" | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| cache: true | |
| cache-dependency-path: "src/product-management-service/**/go.sum" | |
| - name: Run unit tests | |
| shell: bash | |
| run: | | |
| cd src/product-management-service | |
| make unit-test | |
| - name: Go vet | |
| shell: bash | |
| run: | | |
| for mod_dir in src/product-management-service/src/core \ | |
| src/product-management-service/src/observability \ | |
| src/product-management-service/src/product-acl \ | |
| src/product-management-service/src/product-api \ | |
| src/product-management-service/src/product-event-publisher; do | |
| (cd "$mod_dir" && go vet ./...) | |
| done | |
| deploy-tf: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| concurrency: | |
| group: tf-product-management-service | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3 | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| cache: true | |
| cache-dependency-path: "src/product-management-service/**/go.sum" | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: ${{ vars.TF_AWS_REGION }} | |
| - name: Set Commit Hash Environment Variables | |
| shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
| - name: Build | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: ${{ env.sha_short }} | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make build | |
| - name: Deploy to ephemeral environment | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "tf-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make tf-apply | |
| - name: Integration test ephemeral environment | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "tf-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| - name: Destroy ephemeral environment | |
| shell: bash | |
| if: always() | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "tf-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make tf-destroy | |
| - name: Deploy to dev | |
| if: github.event_name == 'push' | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make tf-apply | |
| - name: Integration test dev | |
| if: github.event_name == 'push' | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| - name: Destroy dev | |
| shell: bash | |
| if: always() | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.TF_AWS_REGION }} | |
| TF_STATE_BUCKET_NAME: ${{secrets.TF_STATE_BUCKET_NAME}} | |
| run: | | |
| cd src/product-management-service | |
| make tf-destroy | |
| deploy-cdk: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| concurrency: | |
| group: cdk-product-management-service | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| node-version: "20" | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| cache: true | |
| cache-dependency-path: "src/product-management-service/**/go.sum" | |
| - name: Install CDK | |
| run: | | |
| npm install -g aws-cdk | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: ${{ vars.CDK_AWS_REGION }} | |
| - name: Set Commit Hash Environment Variables | |
| shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
| - name: Deploy to ephemeral environment | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "cdk-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| run: | | |
| cd src/product-management-service | |
| make cdk-deploy | |
| - name: Integration test ephemeral environment | |
| shell: bash | |
| env: | |
| ENV: "cdk-${{ env.sha_short }}" | |
| AWS_REGION: ${{ vars.CDK_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| - name: Destroy ephemeral environment | |
| shell: bash | |
| if: always() | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "cdk-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| run: | | |
| cd src/product-management-service | |
| make cdk-destroy | |
| - name: Deploy to dev | |
| if: github.event_name == 'push' | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| run: | | |
| cd src/product-management-service | |
| make cdk-deploy | |
| - name: Integration test dev | |
| if: github.event_name == 'push' | |
| shell: bash | |
| env: | |
| ENV: "dev" | |
| AWS_REGION: ${{ vars.CDK_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| - name: Destroy dev | |
| shell: bash | |
| if: always() | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| run: | | |
| cd src/product-management-service | |
| make cdk-destroy | |
| deploy-cdk-prod: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| needs: deploy-cdk | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| node-version: "20" | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| cache: true | |
| cache-dependency-path: "src/product-management-service/**/go.sum" | |
| - name: Install CDK | |
| run: | | |
| npm install -g aws-cdk | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df | |
| with: | |
| role-to-assume: ${{ secrets.PRODUCTION_AWS_ROLE_ARN }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: ${{ vars.CDK_PROD_AWS_REGION }} | |
| - name: Set Commit Hash Environment Variables | |
| shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
| - name: Deploy to ephemeral environment | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "prod" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| run: | | |
| cd src/product-management-service | |
| make cdk-deploy | |
| - name: Integration test ephemeral environment | |
| shell: bash | |
| env: | |
| ENV: "prod" | |
| AWS_REGION: ${{ vars.CDK_PROD_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| deploy-sam: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| concurrency: | |
| group: sam-product-management-service | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node | |
| uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| node-version: "22" | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| cache: true | |
| cache-dependency-path: "src/product-management-service/**/go.sum" | |
| - uses: aws-actions/setup-sam@0578b2f57e540e67233c3ce0c5477ee36938ff3d # v1.0.0 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
| aws-region: ${{ vars.SAM_AWS_REGION }} | |
| - name: Set Commit Hash Environment Variables | |
| shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
| - name: Deploy to ephemeral environment | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "sam-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.SAM_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make sam | |
| - name: Integration test ephemeral environment | |
| shell: bash | |
| env: | |
| ENV: "sam-${{ env.sha_short }}" | |
| AWS_REGION: ${{ vars.SAM_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| - name: Destroy ephemeral environment | |
| shell: bash | |
| if: always() | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "sam-${{ env.sha_short }}" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.SAM_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make sam-destroy | |
| - name: Deploy to dev | |
| if: github.event_name == 'push' | |
| shell: bash | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.SAM_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make sam | |
| - name: Integration test dev | |
| if: github.event_name == 'push' | |
| shell: bash | |
| env: | |
| ENV: "dev" | |
| AWS_REGION: ${{ vars.SAM_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make integration-test | |
| - name: Destroy dev | |
| shell: bash | |
| if: always() | |
| env: | |
| COMMIT_HASH: ${{ env.sha_short }} | |
| ENV: "dev" | |
| DD_API_KEY: ${{secrets.DD_API_KEY}} | |
| DD_SITE: ${{ vars.DD_SITE }} | |
| AWS_REGION: ${{ vars.SAM_AWS_REGION }} | |
| run: | | |
| cd src/product-management-service | |
| make sam-destroy |