Acceptance Tests #456
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Acceptance Tests' | |
on: | |
workflow_dispatch: | |
inputs: | |
terraform_version: | |
description: 'Terraform version to use, e.g. 1.5.6, empty for latest' | |
type: string | |
required: false | |
test_group: | |
description: 'Test group to run, e.g. advanced_cluster, empty for all' | |
type: string | |
required: false | |
workflow_call: # workflow runs after Test Suite or code-health | |
inputs: | |
terraform_version: | |
description: 'Terraform version to use, empty for latest' | |
type: string | |
required: false | |
env: | |
terraform_version: ${{ inputs.terraform_version || vars.TF_VERSION_LATEST }} | |
# CI: true # GH does this automatically | |
TF_ACC: 1 | |
SKIP_TEST_EXTERNAL_CREDENTIALS: true | |
TF_LOG: ${{ vars.LOG_LEVEL }} | |
ACCTEST_TIMEOUT: ${{ vars.ACCTEST_TIMEOUT }} | |
jobs: | |
change-detection: | |
runs-on: ubuntu-latest | |
env: | |
mustTrigger: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.test_group == '') }} | |
outputs: | |
cluster_outage_simulation: ${{ steps.filter.outputs.cluster_outage_simulation == 'true' || env.mustTrigger == 'true' }} | |
advanced_cluster: ${{ steps.filter.outputs.advanced_cluster == 'true' || env.mustTrigger == 'true' }} | |
cluster: ${{ steps.filter.outputs.cluster == 'true' || env.mustTrigger == 'true' }} | |
search_deployment: ${{ steps.filter.outputs.search_deployment == 'true' || env.mustTrigger == 'true' }} | |
stream: ${{ steps.filter.outputs.stream == 'true' || env.mustTrigger == 'true' }} | |
generic: ${{ steps.filter.outputs.generic == 'true' || env.mustTrigger == 'true' }} | |
backup_online_archive: ${{ steps.filter.outputs.backup_online_archive == 'true' || env.mustTrigger == 'true' }} | |
backup_snapshots: ${{ steps.filter.outputs.backup_snapshots == 'true' || env.mustTrigger == 'true' }} | |
federation: ${{ steps.filter.outputs.federation == 'true' || env.mustTrigger == 'true' }} | |
backup_schedule: ${{ steps.filter.outputs.backup_schedule == 'true' || env.mustTrigger == 'true' }} | |
project: ${{ steps.filter.outputs.project == 'true' || env.mustTrigger == 'true' }} | |
serverless: ${{ steps.filter.outputs.serverless == 'true' || env.mustTrigger == 'true' }} | |
network: ${{ steps.filter.outputs.network == 'true' || env.mustTrigger == 'true' }} | |
config: ${{ steps.filter.outputs.config == 'true' || env.mustTrigger == 'true' }} | |
assume_role: ${{ steps.filter.outputs.assume_role == 'true' || env.mustTrigger == 'true' }} | |
event_trigger: ${{ steps.filter.outputs.event_trigger == 'true' || env.mustTrigger == 'true' }} | |
search_index: ${{ steps.filter.outputs.search_index == 'true' || env.mustTrigger == 'true' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
assume_role: | |
- 'internal/provider/*.go' | |
cluster_outage_simulation: | |
- 'internal/service/clusteroutagesimulation/*.go' | |
advanced_cluster: | |
- 'internal/service/advancedcluster/*.go' | |
cluster: | |
- 'internal/service/cluster/*.go' | |
search_deployment: | |
- 'internal/service/searchdeployment/*.go' | |
stream: | |
- 'internal/service/streaminstance/*.go' | |
generic: | |
- 'internal/service/backupcompliancepolicy/*.go' | |
- 'internal/service/auditing/*.go' | |
- 'internal/service/x509authenticationdatabaseuser/*.go' | |
backup_online_archive: | |
- 'internal/service/onlinearchive/*.go' | |
backup_snapshots: | |
- 'internal/service/cloudbackupsnapshot/*.go' | |
- 'internal/service/cloudbackupsnapshotexportbucket/*.go' | |
- 'internal/service/cloudbackupsnapshotexportjob/*.go' | |
backup_schedule: | |
- 'internal/service/cloudbackupschedule/*.go' | |
project: | |
- 'internal/service/project/*.go' | |
- 'internal/service/projectipaccesslist/*.go' | |
- 'internal/service/accesslistapikey/*.go' | |
- 'internal/service/projectinvitation/*.go' | |
serverless: | |
- 'internal/service/serverlessinstance/*.go' | |
- 'internal/service/privatelinkendpointserverless/*.go' | |
- 'internal/service/privatelinkendpointserviceserverless/*.go' | |
network: | |
- 'internal/service/networkcontainer/*.go' | |
- 'internal/service/networkpeering/*.go' | |
- 'internal/service/privateendpointregionalmode/*.go' | |
- 'internal/service/privatelinkendpoint/*.go' | |
- 'internal/service/privatelinkendpointservice/*.go' | |
- 'internal/service/privatelinkendpointservicedatafederationonlinearchive/*.go' | |
federation: | |
- 'internal/service/federateddatabaseinstance/*.go' | |
config: | |
- 'internal/service/alertconfiguration/*.go' | |
- 'internal/service/atlasuser/*.go' | |
- 'internal/service/databaseuser/*.go' | |
- 'internal/service/projectapikey/*.go' | |
- 'internal/service/apikey/*.go' | |
- 'internal/service/teams/*.go' | |
- 'internal/service/cloudprovideraccess/*.go' | |
- 'internal/service/customdbrole/*.go' | |
- 'internal/service/maintenancewindow/*.go' | |
- 'internal/service/customdnsconfigurationclusteraws/*.go' | |
- 'internal/service/rolesorgid/*.go' | |
- 'internal/service/orginvitation/*.go' | |
- 'internal/service/organization/*.go' | |
- 'internal/service/thirdpartyintegration/*.go' | |
event_trigger: | |
- 'internal/service/eventtrigger/*.go' | |
search_index: | |
- 'internal/service/searchindex/*.go' | |
cluster_outage_simulation: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.cluster_outage_simulation == 'true' || inputs.test_group == 'cluster_outage_simulation' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccOutageSimulationCluster" | |
run: make testacc | |
advanced_cluster: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.advanced_cluster == 'true' || inputs.test_group == 'advanced_cluster' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccClusterAdvancedCluster" | |
run: make testacc | |
cluster: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.cluster == 'true' || inputs.test_group == 'cluster' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccClusterRSCluster" | |
run: make testacc | |
search_deployment: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.search_deployment == 'true' || inputs.test_group == 'search_deployment' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccSearchDeployment" | |
run: make testacc | |
stream: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.stream == 'true' || inputs.test_group == 'stream' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccStream" | |
run: make testacc | |
generic: # Acceptance tests that do not use any time-consuming resource (example: cluster) | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.generic == 'true' || inputs.test_group == 'generic' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
CA_CERT: ${{ secrets.CA_CERT }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ vars.MONGODB_ATLAS_PROJECT_OWNER_ID }} | |
TEST_REGEX: "^TestAccGeneric" | |
run: | | |
make testacc | |
backup_online_archive: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.backup_online_archive == 'true' || inputs.test_group == 'backup_online_archive' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ vars.MONGODB_ATLAS_PROJECT_OWNER_ID }} | |
TEST_REGEX: "^TestAccBackupRSOnlineArchive" | |
run: make testacc | |
backup_snapshots: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.backup_snapshots == 'true' || inputs.test_group == 'backup_snapshots' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ vars.MONGODB_ATLAS_PROJECT_OWNER_ID }} | |
TEST_REGEX: "^TestAccBackupRSCloudBackupSnapshot" | |
run: make testacc | |
backup_schedule: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.backup_schedule == 'true' || inputs.test_group == 'backup_schedule' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ vars.MONGODB_ATLAS_PROJECT_OWNER_ID }} | |
TEST_REGEX: "^TestAccBackupRSCloudBackupSchedule" | |
run: make testacc | |
project: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.project == 'true' || inputs.test_group == 'project' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ vars.MONGODB_ATLAS_PROJECT_OWNER_ID }} | |
MONGODB_ATLAS_TEAMS_IDS: ${{ vars.MONGODB_ATLAS_TEAMS_IDS }} | |
TEST_REGEX: "^TestAccProject" | |
run: make testacc | |
serverless: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.serverless == 'true' || inputs.test_group == 'serverless' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccServerless" | |
run: make testacc | |
network: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.network == 'true' || inputs.test_group == 'network' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_PROJECT_ID: ${{ vars.MONGODB_ATLAS_PROJECT_ID_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_ENABLE_BETA: ${{ vars.MONGODB_ATLAS_ENABLE_BETA }} | |
MONGODB_ATLAS_ENDPOINT_ID: ${{ vars.MONGODB_ATLAS_AWS_ENDPOINT_ID_NETWORK }} | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
TEST_REGEX: "^TestAccNetwork" | |
run: make testacc | |
federation: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.federation == 'true' || inputs.test_group == 'federation' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccFederatedDatabaseInstance" | |
run: make testacc | |
config: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.config == 'true' || inputs.test_group == 'config' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV_NETWORK }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ vars.MONGODB_ATLAS_PROJECT_OWNER_ID }} | |
MONGODB_ATLAS_USERNAME_CLOUD_DEV: ${{ vars.MONGODB_ATLAS_USERNAME_CLOUD_DEV }} | |
AZURE_ATLAS_APP_ID: ${{vars.AZURE_ATLAS_APP_ID}} | |
AZURE_SERVICE_PRINCIPAL_ID: ${{vars.AZURE_SERVICE_PRINCIPAL_ID}} | |
AZURE_TENANT_ID: ${{vars.AZURE_TENANT_ID}} | |
TEST_REGEX: "^TestAccConfig" | |
run: make testacc | |
assume_role: | |
needs: [ change-detection] | |
if: ${{ needs.change-detection.outputs.assume_role == 'true' || inputs.test_group == 'assume_role' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- id: sts-assume-role | |
name: Generate STS Temporary credential for acceptance testing | |
shell: bash | |
env: | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
ASSUME_ROLE_ARN: ${{ vars.ASSUME_ROLE_ARN }} | |
run: bash ./scripts/generate-credentials-with-sts-assume-role.sh | |
- name: Acceptance Tests | |
env: | |
ASSUME_ROLE_ARN: ${{ vars.ASSUME_ROLE_ARN }} | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
STS_ENDPOINT: ${{ vars.STS_ENDPOINT }} | |
SECRET_NAME: ${{ vars.AWS_SECRET_NAME }} | |
AWS_ACCESS_KEY_ID: ${{ steps.sts-assume-role.outputs.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ steps.sts-assume-role.outputs.AWS_SECRET_ACCESS_KEY }} | |
AWS_SESSION_TOKEN: ${{ steps.sts-assume-role.outputs.AWS_SESSION_TOKEN }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
TEST_REGEX: "^TestAccSTSAssumeRole" | |
run: make testacc | |
search_index: | |
needs: [ change-detection ] | |
if: ${{ needs.change-detection.outputs.search_index == 'true' || inputs.test_group == 'search_index' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.terraform_version }} | |
terraform_wrapper: false | |
- name: Acceptance Tests | |
env: | |
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }} | |
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }} | |
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }} | |
MONGODB_ATLAS_PROJECT_ID: ${{ vars.MONGODB_ATLAS_ACCTEST_SEARCH_INDEX_PROJECT_ID_CLOUD_DEV }} | |
TEST_REGEX: "^TestAccSearchIndex" | |
run: make testacc | |