mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
230 stars 167 forks source link

chore: Improve usage of test_name in the Acceptance test workflow #2353

Closed maastha closed 1 week ago

maastha commented 1 week ago

Description

This PR improves usage of test_name in the Acceptance test workflow .

Link to any related issue(s):

Type of change:

Required Checklist:

Further comments

lantoli commented 1 week ago

knit: these two lines can be reverted:

mustTrigger: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.test_group == '' && inputs.test_name == '')  }}

if: ${{ inputs.test_group == '' && inputs.test_name == '' && env.mustTrigger == 'false' }}

to the previous version without test_name:

mustTrigger: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.test_group == '' )  }}

if: ${{ inputs.test_group == ''  && env.mustTrigger == 'false' }}

We're saying that when using test_name a test_group must be specified, so if we're not using a test_group ( inputs.test_group == '') then we're sure that test_name is empty, no need to check it

EspenAlbert commented 1 week ago

Nice!