|
11 | 11 | - develop |
12 | 12 | env: |
13 | 13 | TERRAFORM_VERSION: "1.2.6" |
| 14 | + REDISCLOUD_ACCESS_KEY: ${{ secrets.REDISCLOUD_ACCESS_KEY_STAGING }} |
| 15 | + REDISCLOUD_SECRET_KEY: ${{ secrets.REDISCLOUD_SECRET_KEY_STAGING }} |
| 16 | + REDISCLOUD_URL: ${{ secrets.REDISCLOUD_URL_STAGING }} |
| 17 | + AWS_TEST_CLOUD_ACCOUNT_NAME: "${{ secrets.AWS_TEST_CLOUD_ACCOUNT_NAME_STAGING }}" |
| 18 | + AWS_PEERING_REGION: ${{ secrets.AWS_PEERING_REGION }} |
| 19 | + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} |
| 20 | + AWS_VPC_CIDR: ${{ secrets.AWS_VPC_CIDR }} |
| 21 | + AWS_VPC_ID: ${{ secrets.AWS_VPC_ID }} |
| 22 | + AWS_TEST_TGW_ID: ${{ secrets.AWS_TEST_TGW_ID_STAGING }} |
| 23 | + TF_ACC: true |
| 24 | + TF_LOG: info |
| 25 | + AWS_ACCESS_KEY_ID: ${{ secrets.CLOUD_ACCOUNT_KEY }} |
| 26 | + AWS_ACCESS_SECRET_KEY: ${{ secrets.CLOUD_ACCOUNT_SECRET }} |
| 27 | + AWS_CONSOLE_USERNAME: ${{ secrets.CLOUD_ACCOUNT_USERNAME }} |
| 28 | + AWS_CONSOLE_PASSWORD: ${{ secrets.CLOUD_ACCOUNT_PASS }} |
| 29 | + AWS_SIGNIN_URL: ${{ secrets.CLOUD_ACCOUNT_URL }} |
| 30 | + GCP_VPC_PROJECT: ${{ secrets.GCP_VPC_PROJECT }} |
| 31 | + GCP_VPC_ID: ${{ secrets.GCP_VPC_ID }} |
| 32 | + GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} |
| 33 | + GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} |
14 | 34 |
|
15 | 35 | concurrency: |
16 | 36 | group: ${{ github.workflow }}-${{ github.ref }} |
|
30 | 50 | path: terraform-plugin-dir |
31 | 51 | key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('provider/**') }} |
32 | 52 | - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' |
33 | | - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 |
| 53 | + uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
34 | 54 | with: |
35 | 55 | go-version-file: go.mod |
36 | 56 | - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' |
@@ -86,66 +106,90 @@ jobs: |
86 | 106 | mkdir terraform-providers-schema |
87 | 107 | terraform providers schema -json > terraform-providers-schema/schema.json |
88 | 108 |
|
89 | | - go_test: |
90 | | - name: go test |
| 109 | + go_test_databases: |
| 110 | + name: go test Databases |
91 | 111 | needs: [go_build] |
92 | 112 | runs-on: ubuntu-latest |
93 | 113 | steps: |
94 | 114 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
95 | | - - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 |
| 115 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
96 | 116 | with: |
97 | 117 | go-version-file: go.mod |
98 | | - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 |
99 | | - id: filter |
| 118 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(Essentials|Pro|ActiveActive)Database_.*"' |
| 119 | + |
| 120 | + go_test_subscriptions: |
| 121 | + name: go test Subscriptions |
| 122 | + needs: [go_test_databases] |
| 123 | + runs-on: ubuntu-latest |
| 124 | + steps: |
| 125 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 126 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
| 127 | + with: |
| 128 | + go-version-file: go.mod |
| 129 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(Essentials|Pro|ActiveActive)Subscription_.*"' |
| 130 | + |
| 131 | + go_test_subscriptions_tls: |
| 132 | + name: go test Subscriptions TLS |
| 133 | + needs: [go_test_subscriptions] |
| 134 | + runs-on: ubuntu-latest |
| 135 | + steps: |
| 136 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 137 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
100 | 138 | with: |
101 | | - filters: | |
102 | | - code-changes: |
103 | | - - 'go.mod' |
104 | | - - 'go.sum' |
105 | | - - 'provider/**' |
106 | | - - '*.go' |
107 | | - - '.github/workflows/**' |
108 | | - - run: make testacc |
109 | | - if: steps.filter.outputs.code-changes == 'true' |
110 | | - env: |
111 | | - REDISCLOUD_ACCESS_KEY: ${{ secrets.REDISCLOUD_ACCESS_KEY_STAGING }} |
112 | | - REDISCLOUD_SECRET_KEY: ${{ secrets.REDISCLOUD_SECRET_KEY_STAGING }} |
113 | | - REDISCLOUD_URL: ${{ secrets.REDISCLOUD_URL_STAGING }} |
114 | | - AWS_TEST_CLOUD_ACCOUNT_NAME: "${{ secrets.AWS_TEST_CLOUD_ACCOUNT_NAME_STAGING }}" |
115 | | - AWS_PEERING_REGION: ${{ secrets.AWS_PEERING_REGION }} |
116 | | - AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} |
117 | | - AWS_VPC_CIDR: ${{ secrets.AWS_VPC_CIDR }} |
118 | | - AWS_VPC_ID: ${{ secrets.AWS_VPC_ID }} |
119 | | - AWS_TEST_TGW_ID: ${{ secrets.AWS_TEST_TGW_ID_STAGING }} |
120 | | - TF_ACC: true |
121 | | - TF_LOG: info |
122 | | - AWS_ACCESS_KEY_ID: ${{ secrets.CLOUD_ACCOUNT_KEY }} |
123 | | - AWS_ACCESS_SECRET_KEY: ${{ secrets.CLOUD_ACCOUNT_SECRET }} |
124 | | - AWS_CONSOLE_USERNAME: ${{ secrets.CLOUD_ACCOUNT_USERNAME }} |
125 | | - AWS_CONSOLE_PASSWORD: ${{ secrets.CLOUD_ACCOUNT_PASS }} |
126 | | - AWS_SIGNIN_URL: ${{ secrets.CLOUD_ACCOUNT_URL }} |
127 | | - GCP_VPC_PROJECT: ${{ secrets.GCP_VPC_PROJECT }} |
128 | | - GCP_VPC_ID: ${{ secrets.GCP_VPC_ID }} |
129 | | - GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} |
130 | | - GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} |
131 | | - - name: Generate code coverage report |
132 | | - if: steps.filter.outputs.code-changes == 'true' && (success() || failure()) |
133 | | - run: make generate_coverage |
134 | | - - name: Upload code coverage report |
135 | | - if: steps.filter.outputs.code-changes == 'true' && (success() || failure()) |
136 | | - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 |
| 139 | + go-version-file: go.mod |
| 140 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloudSubscriptionTls_.*"' |
| 141 | + |
| 142 | + go_test_essentials_plan: |
| 143 | + name: go test Essentials Plan |
| 144 | + needs: [go_test_subscriptions_tls] |
| 145 | + runs-on: ubuntu-latest |
| 146 | + steps: |
| 147 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 148 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
137 | 149 | with: |
138 | | - name: coverage.html |
139 | | - path: bin/coverage.html |
| 150 | + go-version-file: go.mod |
| 151 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloudEssentialsPlan_.*"' |
| 152 | + |
| 153 | + go_test_persistence_modules_regions_acl: |
| 154 | + name: go test Other |
| 155 | + needs: [go_test_essentials_plan] |
| 156 | + runs-on: ubuntu-latest |
| 157 | + steps: |
| 158 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 159 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
| 160 | + with: |
| 161 | + go-version-file: go.mod |
| 162 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(DataPersistence|DatabaseModules|Regions|Acl).*"' |
| 163 | + |
| 164 | + go_test_cloud_account: |
| 165 | + name: go test Cloud Account |
| 166 | + needs: [go_test_persistence_modules_regions_acl] |
| 167 | + runs-on: ubuntu-latest |
| 168 | + steps: |
| 169 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 170 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
| 171 | + with: |
| 172 | + go-version-file: go.mod |
| 173 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-test.short -run="TestAcc(DataSource|Resource)RedisCloud(CloudAccount).*"' |
| 174 | + |
| 175 | + go_test_transit_payment: |
| 176 | + name: go test Transit Gateway & Payment |
| 177 | + needs: [go_test_cloud_account] |
| 178 | + runs-on: ubuntu-latest |
| 179 | + steps: |
| 180 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 181 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
| 182 | + with: |
| 183 | + go-version-file: go.mod |
| 184 | + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(TransitGatewayAttachment|PaymentMethod).*"' |
140 | 185 |
|
141 | 186 | tfproviderlint: |
142 | 187 | name: tfproviderlint |
143 | 188 | needs: [go_build] |
144 | 189 | runs-on: ubuntu-latest |
145 | 190 | steps: |
146 | 191 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
147 | | - - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 |
| 192 | + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
148 | 193 | with: |
149 | 194 | go-version-file: go.mod |
150 | 195 | - run: make tfproviderlint |
151 | | - |
|
0 commit comments