|
66 | 66 |
|
67 | 67 | salesforce-integration: |
68 | 68 | runs-on: ubuntu-latest |
| 69 | + name: Salesforce Integration |
69 | 70 | env: |
70 | 71 | RUN_SALESFORCE_INTEGRATION_TESTS: true |
71 | 72 | SF_CONSUMER_KEY: ${{ secrets.SF_CONSUMER_KEY }} |
@@ -93,24 +94,36 @@ jobs: |
93 | 94 | fi |
94 | 95 | done |
95 | 96 |
|
96 | | - - name: Skip when Salesforce secrets are missing |
| 97 | + - name: Resolve Salesforce test configuration |
| 98 | + id: salesforce-config |
97 | 99 | run: | |
98 | 100 | missing=0 |
99 | 101 | for key in SF_CONSUMER_KEY SF_CONSUMER_SECRET SF_USERNAME SF_PASSWORD; do |
100 | 102 | if [ -z "${!key}" ]; then |
101 | | - echo "Skipping Salesforce integration tests because $key is not configured." |
| 103 | + echo "Missing Salesforce secret: $key" |
102 | 104 | missing=1 |
103 | 105 | fi |
104 | 106 | done |
105 | | - if [ "$missing" -ne 0 ]; then |
106 | | - exit 0 |
107 | | - fi |
| 107 | +
|
108 | 108 | if [ -z "$SF_LOGIN_URL" ]; then |
109 | 109 | echo "SF_LOGIN_URL=https://login.salesforce.com" >> "$GITHUB_ENV" |
110 | 110 | fi |
111 | 111 |
|
| 112 | + if [ "$missing" -ne 0 ]; then |
| 113 | + echo "can_run=false" >> "$GITHUB_OUTPUT" |
| 114 | + exit 0 |
| 115 | + fi |
| 116 | +
|
| 117 | + echo "can_run=true" >> "$GITHUB_OUTPUT" |
| 118 | +
|
| 119 | + - name: Skip Salesforce integration test |
| 120 | + if: steps.salesforce-config.outputs.can_run != 'true' |
| 121 | + run: echo "Skipping Salesforce integration tests because the required GitHub secrets are not configured for this pull request." |
| 122 | + |
112 | 123 | - name: Install dependencies |
| 124 | + if: steps.salesforce-config.outputs.can_run == 'true' |
113 | 125 | run: composer update --prefer-stable --prefer-dist --no-interaction --no-suggest |
114 | 126 |
|
115 | 127 | - name: Execute Salesforce integration test |
| 128 | + if: steps.salesforce-config.outputs.can_run == 'true' |
116 | 129 | run: vendor/bin/phpunit --filter UserPasswordIntegrationTest |
0 commit comments