Skip to content

move matrix inside it's job #5

move matrix inside it's job

move matrix inside it's job #5

Workflow file for this run

on: push
name: Plugin Patch Test
jobs:
test_plugin:
strategy:
matrix:
service_partition: [
{
"service": "ec2",
"service_test": "terraform-provider-aws/internal/service/ec2/ec2_host_data_source_test.go::TestAccEC2HostDataSource_basic terraform-provider-aws/internal/service/ec2/ec2_host_data_source_test.go::TestAccEC2HostDataSource_filter terraform-provider-aws/internal/service/ec2/ec2_host_test.go::TestAccEC2Host_basic terraform-provider-aws/internal/service/ec2/ec2_host_test.go::TestAccEC2Host_disappears terraform-provider-aws/internal/service/ec2/ec2_host_test.go::TestAccEC2Host_instanceFamily terraform-provider-aws/internal/service/ec2/ec2_host_test.go::TestAccEC2Host_tags terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_basic terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_tags terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_azUserData terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_RootBlockDevice_kmsKeyID terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_rootInstanceStore terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_privateIP terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_keyPair terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_vpc terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_placementGroup terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_securityGroups terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_vpcSecurityGroups terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_getUserData terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_GetUserData_noUserData terraform-provider-aws/internal/service/ec2/ec2_instance_data_source_test.go::TestAccEC2InstanceDataSource_timeout",
},
{
"service": "rds",
"service_test": "terraform-provider-aws/internal/service/rds/cluster_data_source_test.go::TestAccRDSClusterDataSource_basic terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_PerformanceInsightsEnabled_auroraMySQL1 terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_PerformanceInsightsEnabled_auroraPostgresql terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_PerformanceInsightsKMSKeyID_auroraMySQL1 terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_PerformanceInsightsKMSKeyIDAuroraMySQL1_defaultKeyToCustomKey terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_performanceInsightsRetentionPeriod terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_PerformanceInsightsKMSKeyID_auroraPostgresql terraform-provider-aws/internal/service/rds/cluster_instance_test.go::TestAccRDSClusterInstance_PerformanceInsightsKMSKeyIDAuroraPostgresql_defaultKeyToCustomKey terraform-provider-aws/internal/service/rds/cluster_test.go::TestAccRDSCluster_disappears terraform-provider-aws/internal/service/rds/cluster_test.go::TestAccRDSCluster_tags terraform-provider-aws/internal/service/rds/cluster_test.go::TestAccRDSCluster_identifierGenerated terraform-provider-aws/internal/service/rds/cluster_test.go::TestAccRDSCluster_identifierPrefix",
},
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-go@v3
with:
go-version: '1.20.x'
cache: true
cache-dependency-path: terraform-provider-aws/go.sum
- name: Set up Python 3.10.5
uses: actions/setup-python@v4
with:
python-version: '3.10.5'
cache: 'pip'
- name: Install system dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
- name: Patch Terraform Provider
run: |
source .venv/bin/activate
cd terraform-provider-aws && go mod vendor
cd ../
python -m terraform_pytest.main patch
- name: Build ${{ matrix.service_partition.service }} Binary
run: |
source .venv/bin/activate
python -m terraform_pytest.main build -s ${{ matrix.service_partition.service }}
ls -la ./test-bin
- name: Setup LocalStack
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
TMP_USER: ${{ secrets.TMP_USER }}
TMP_PW: ${{ secrets.TMP_PW }}
run: |
source .venv/bin/activate
pip install --pre localstack
enable_pro=${{ inputs.enable-pro || 'true' }}
if [[ $enable_pro != 'true' ]]
then
docker pull localstack/localstack
else
docker pull localstack/localstack-pro
localstack auth login -u $TMP_USER -p $TMP_PW # login is currently required
localstack extensions init
localstack extensions install "git+https://github.com/localstack/localstack-moto-test-coverage/#egg=collect-raw-metric-data-extension&subdirectory=collect-raw-metric-data-extension"
fi
- name: Run ${{ matrix.service_partition.service }} Tests
env:
SERVICE: ${{ matrix.service_partition.service }}
run: |
source .venv/bin/activate
export LOCALSTACK_API_KEY=${{ secrets.LOCALSTACK_API_KEY }}
options="-s -v --ls-start --gather-metrics"
python -m pytest --junitxml=target/reports/pytest.xml ${{ matrix.service_partition.service_test }} $options
- name: Archive Test Result
uses: actions/upload-artifact@v3
if: always()
with:
name: test-metrics
path: target/reports
- name: Publish ${{ matrix.service_partition.service }} Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: target/reports/*.xml
check_name: ${{ matrix.service_partition.service }} Terraform Test Results