Skip to content

Commit

Permalink
removing caching from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon committed Jan 24, 2025
1 parent 66a902e commit 0fa2f10
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/eks-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0fa2f10

Please sign in to comment.