From 0fa2f10c6f27ad38c84ccf3c44c50eda1d6a3810 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Fri, 24 Jan 2025 16:11:51 -0500 Subject: [PATCH] removing caching from tests --- .github/workflows/eks-e2e-test.yml | 10 ++++ .github/workflows/integration-test.yml | 76 ++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/.github/workflows/eks-e2e-test.yml b/.github/workflows/eks-e2e-test.yml index bbec747b00..a695fdd8e3 100644 --- a/.github/workflows/eks-e2e-test.yml +++ b/.github/workflows/eks-e2e-test.yml @@ -90,14 +90,24 @@ jobs: aws-region: ${{ inputs.region }} role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: cache_if_success + uses: actions/cache@v3 + with: + path: go.mod + key: ${{inputs.region}}-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} + - name: Login ECR id: login-ecr + if: steps.cache_if_success.outputs.cache-hit != 'true' uses: aws-actions/amazon-ecr-login@v2 - name: Install Terraform + if: steps.cache_if_success.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.cache_if_success.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 32eac385d6..6423786240 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -654,14 +654,24 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: ecs-ec2-integration-test + uses: actions/cache@v3 + with: + path: go.mod + key: ecs-ec2-integration-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.test_dir }} + - name: Login ECR id: login-ecr + if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true' uses: aws-actions/amazon-ecr-login@v2 - name: Install Terraform + if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply @@ -730,14 +740,24 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: ecs-fargate-integration-test + uses: actions/cache@v3 + with: + path: go.mod + key: ecs-fargate-integration-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.test_dir }} + - name: Login ECR id: login-ecr + if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true' uses: aws-actions/amazon-ecr-login@v2 - name: Install Terraform + if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply @@ -801,14 +821,24 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: eks-ec2-integration-test + uses: actions/cache@v3 + with: + path: go.mod + key: ${{ matrix.arrays.terraform_dir }}-${{ matrix.arrays.k8sVersion }}-${{ matrix.arrays.instanceType }}-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.test_dir }} + - name: Login ECR id: login-ecr + if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' uses: aws-actions/amazon-ecr-login@v2 - name: Install Terraform + if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply @@ -876,14 +906,24 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: eks-ec2-integration-test + uses: actions/cache@v3 + with: + path: go.mod + key: eks-ec2-integration-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.test_dir }} + - name: Login ECR id: login-ecr + if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' uses: aws-actions/amazon-ecr-login@v2 - name: Install Terraform + if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply @@ -949,10 +989,19 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: performance-tracking + uses: actions/cache@v3 + with: + path: go.mod + key: performance-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} + - name: Install Terraform + if: steps.performance-tracking.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.performance-tracking.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply @@ -1011,10 +1060,19 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: performance-tracking + uses: actions/cache@v3 + with: + path: go.mod + key: performance-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} + - name: Install Terraform + if: steps.performance-tracking.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.performance-tracking.outputs.cache-hit != 'true' run: terraform --version - name: Terraform apply @@ -1073,10 +1131,19 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: stress-tracking + uses: actions/cache@v3 + with: + path: go.mod + key: stress-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} + - name: Install Terraform + if: steps.stress-tracking.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.stress-tracking.outputs.cache-hit != 'true' run: terraform --version - name: Echo Test Info @@ -1137,10 +1204,19 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} + - name: Cache if success + id: ec2-win-stress-tracking-test + uses: actions/cache@v3 + with: + path: go.mod + key: ec2-win-stress-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} + - name: Install Terraform + if: steps.ec2-win-stress-tracking-test.outputs.cache-hit != 'true' uses: hashicorp/setup-terraform@v3 - name: Verify Terraform version + if: steps.ec2-win-stress-tracking-test.outputs.cache-hit != 'true' run: terraform --version - name: Echo Test Info