Skip to content

DO NOT MERGE - Test AWS integration tests #56

DO NOT MERGE - Test AWS integration tests

DO NOT MERGE - Test AWS integration tests #56

name: aws-tests
on:
workflow_dispatch:
pull_request_target:
types:
- labeled
branches:
- "master"
- "*.z"
paths:
- 'hazelcast/src/main/java/com/hazelcast/aws/**'
- '.github/terraform/aws/**'
jobs:
build:
name: Build Jar's And Docker Images
if: >-
github.repository_owner == 'hazelcast' &&
( github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request_target' &&
github.event.action == 'labeled' &&
github.event.label.name == 'run-discovery-tests'
)
)
uses: ./.github/workflows/build-artifact.yml
secrets: inherit
test:
name: Run Tests
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: aws-discovery-suite/terraform/test
env:
AWS_REGION: us-east-1
strategy:
matrix:
suite: ['ec2_cl_to_ec2_m', 'ec2_cl_to_fargate_ecs_m', 'fargate_ecs_cl_to_ec2_m', 'fargate_ecs_cl_to_fargate_ecs_m']
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Get Secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v1
with:
secret-ids: |
DEVOPS_GITHUB_TOKEN,CN/DEVOPS_GITHUB_TOKEN
- name: Checkout Auto Discovery Test Suite
uses: actions/checkout@v4
with:
repository: hazelcast/auto-discovery-test-suite
token: ${{ env.DEVOPS_GITHUB_TOKEN }}
path: aws-discovery-suite
- name: Download hazelcast.jar
uses: actions/download-artifact@v3
with:
name: hazelcast.jar
path: aws-discovery-suite/terraform/tools
- name: Download aws-discovery-client.jar
uses: actions/download-artifact@v3
with:
name: aws-discovery-client.jar
path: aws-discovery-suite/terraform/tools/client
- name : Set-up Terraform
uses: hashicorp/setup-terraform@v2.0.3
with:
terraform_version: 1.5.4
terraform_wrapper: false
- name: Cache Golang dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Tests
run: |
go test -v -timeout 20m -run TestSuite -suite ${{ matrix.suite }} -member-image ${{ needs.build.outputs.HZ_IMG }} -client-image ${{ needs.build.outputs.CL_IMG }}