diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 50951a1a38..3c0c1fd50c 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -4,19 +4,27 @@ on: workflow_dispatch: inputs: terraform_version: - description: 'Terraform version to use, e.g. 1.5.6, empty for latest' + description: 'Terraform version to use, e.g. 1.6.x, 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 + ref: + description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch' + 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' + description: 'Terraform version to use, e.g. 1.6.x, empty for latest' type: string required: false + ref: + description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch' + type: string + required: false env: terraform_version: ${{ inputs.terraform_version || vars.TF_VERSION_LATEST }} @@ -124,10 +132,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -148,10 +156,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -172,10 +180,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -196,10 +204,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -220,10 +228,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -245,10 +253,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -272,10 +280,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -297,10 +305,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -322,10 +330,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -346,10 +354,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -380,10 +388,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -403,10 +411,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -431,10 +439,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -455,10 +463,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -484,10 +492,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 @@ -522,10 +530,10 @@ jobs: 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@v5 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - uses: hashicorp/setup-terraform@v3 diff --git a/.github/workflows/migration-tests.yml b/.github/workflows/migration-tests.yml index 1ac19eea88..c7fa50801b 100644 --- a/.github/workflows/migration-tests.yml +++ b/.github/workflows/migration-tests.yml @@ -4,11 +4,11 @@ on: workflow_dispatch: inputs: terraform_version: - description: 'Terraform version to use, e.g. 1.5.6, empty for latest' + description: 'Terraform version to use, e.g. 1.6.x, empty for latest' type: string required: false provider_version: - description: 'MongoDB Atlas Provider version to use, e.g. 1.13.1, empty for latest' + description: 'Previous MongoDB Atlas Provider version to use, e.g. 1.14.0, empty for latest' type: string required: false test_group: @@ -18,11 +18,11 @@ on: workflow_call: # workflow runs after Test Suite or code-health inputs: terraform_version: - description: 'Terraform version to use, empty for latest' + description: 'Terraform version to use, e.g. 1.6.x, empty for latest' type: string required: false provider_version: - description: 'MongoDB Atlas Provider version for running migration tests, empty for latest' + description: 'Previous MongoDB Atlas Provider version to use, e.g. 1.14.0, empty for latest' type: string required: false diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 45432acc6b..f046d69516 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -7,7 +7,7 @@ on: description: 'Terraform version matrix (JSON array)' default: '["1.6.x", "1.5.x", "1.4.x", "1.3.x", "1.2.x"]' provider_matrix: - description: 'MongoDB Atlas Provider version matrix for running migration tests (JSON array)' + description: 'Previous MongoDB Atlas Provider version matrix for migration tests (JSON array)' default: '[""]' # "" for latest version schedule: