diff --git a/.github/workflows/ec2-integration-test.yml b/.github/workflows/ec2-integration-test.yml index 3c0ac61201..2a31c4d468 100644 --- a/.github/workflows/ec2-integration-test.yml +++ b/.github/workflows/ec2-integration-test.yml @@ -65,13 +65,6 @@ 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: Echo Test Info run: | echo run cache_if_success os ${{ matrix.arrays.os }} arc ${{ matrix.arrays.arc }} test dir ${{ matrix.arrays.test_dir }} @@ -85,7 +78,6 @@ jobs: # nick-fields/retry@v2 starts at base dir - name: Terraform apply - if: steps.cache_if_success.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 2 diff --git a/.github/workflows/eks-e2e-test.yml b/.github/workflows/eks-e2e-test.yml index 3ce70b899b..bbec747b00 100644 --- a/.github/workflows/eks-e2e-test.yml +++ b/.github/workflows/eks-e2e-test.yml @@ -90,28 +90,17 @@ 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 - if: steps.cache_if_success.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 3 diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 1324338bde..32eac385d6 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -154,15 +154,7 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} - - name: Cache if success - id: cf-integration-test - uses: actions/cache@v2 - with: - path: go.mod - key: "cf-integration-${{ github.sha }}-test" - - name: Test cf - if: steps.ec2-linux-integration-test.outputs.cache-hit != 'true' run: | cd test/test/cloudformation go test -timeout 1h -package_path=s3://${S3_INTEGRATION_BUCKET}/integration-test/binary/${{ github.sha }}/linux/amd64/amazon-cloudwatch-agent.rpm -iam_role=${CF_IAM_ROLE} -key_name=${CF_KEY_NAME} -metric_name=mem_used_percent @@ -244,13 +236,6 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} - - name: Cache if success - id: ec2-linux-integration-test - uses: actions/cache@v3 - with: - path: go.mod - key: ec2-nvidia-integration-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} - - name: Echo Test Info run: echo run on ec2 instance os ${{ matrix.arrays.os }} arc ${{ matrix.arrays.arc }} test dir ${{ matrix.arrays.test_dir }} @@ -262,7 +247,7 @@ jobs: # nick-fields/retry@v2 starts at base dir - name: Terraform apply - if: ${{ matrix.arrays.family == 'linux' && steps.ec2-nvidia-integration-test.outputs.cache-hit != 'true' }} + if: ${{ matrix.arrays.family == 'linux' }} uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -295,7 +280,7 @@ jobs: terraform destroy -auto-approve && exit 1 fi - name: Terraform apply - if: ${{ matrix.arrays.family == 'window' && steps.ec2-nvidia-integration-test.outputs.cache-hit != 'true' }} + if: ${{ matrix.arrays.family == 'window' }} uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -465,13 +450,6 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} - - name: Cache if success - id: ec2-win-integration-test - uses: actions/cache@v3 - with: - path: go.mod - key: ec2-win-integration-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} - - name: Echo Test Info run: echo run on ec2 instance os ${{ matrix.arrays.os }} use ssm ${{ matrix.arrays.useSSM }} test ${{ matrix.arrays.test_dir }} @@ -483,7 +461,6 @@ jobs: # nick-fields/retry@v2 starts at base dir - name: Terraform apply - if: steps.ec2-win-integration-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -550,13 +527,6 @@ jobs: aws-region: us-west-2 role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }} - - name: Cache if success - id: ec2-mac-integration-test - uses: actions/cache@v3 - with: - path: go.mod - key: ec2-mac-integration-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }} - - name: Echo OS run: echo run on ec2 instance os ${{ matrix.arrays.os }} @@ -568,7 +538,6 @@ jobs: # nick-fields/retry@v2 starts at base dir - name: Terraform apply - if: steps.ec2-mac-integration-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -685,28 +654,17 @@ 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 - if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -772,28 +730,17 @@ 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 - if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -854,28 +801,17 @@ 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 - if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 2 @@ -940,28 +876,17 @@ 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 - if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 3 @@ -1024,23 +949,13 @@ 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 - if: steps.performance-tracking.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 1 @@ -1096,23 +1011,13 @@ 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 - if: steps.performance-tracking.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 1 @@ -1168,26 +1073,16 @@ 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 run: echo run on ec2 instance os ${{ matrix.arrays.os }} arc ${{ matrix.arrays.arc }} test dir ${{ matrix.arrays.test_dir }} values per minute ${{ matrix.arrays.values_per_minute }} - name: Terraform apply - if: steps.stress-tracking.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 1 @@ -1242,26 +1137,16 @@ 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 run: echo run on ec2 instance os ${{ matrix.arrays.os }} arc ${{ matrix.arrays.arc }} test dir ${{ matrix.arrays.test_dir }} values per minute ${{ matrix.arrays.values_per_minute }} - name: Terraform apply - if: steps.ec2-win-stress-tracking-test.outputs.cache-hit != 'true' uses: nick-fields/retry@v2 with: max_attempts: 1