@@ -271,6 +271,111 @@ jobs:
271271 echo "✅ Cache behavior test completed"
272272 echo "Check action logs to verify cache hit on second run"
273273
274+ test-cache-granularity :
275+ name : Cache Granularity (v2.1)
276+ runs-on : ubuntu-latest
277+
278+ steps :
279+ - name : Checkout
280+ uses : actions/checkout@v4
281+
282+ - name : Setup with Major Cache Granularity
283+ id : setup-major
284+ uses : ./
285+ with :
286+ skip_auth : " true"
287+ cli_version_for_cache : " major"
288+
289+ - name : Setup with Minor Cache Granularity
290+ id : setup-minor
291+ uses : ./
292+ with :
293+ skip_auth : " true"
294+ cli_version_for_cache : " minor"
295+
296+ - name : Setup with Exact Cache Granularity
297+ id : setup-exact
298+ uses : ./
299+ with :
300+ skip_auth : " true"
301+ cli_version_for_cache : " exact"
302+
303+ - name : Verify
304+ run : |
305+ echo "✅ Cache granularity test completed"
306+ echo "All three granularity options accepted: major, minor, exact"
307+
308+ test-sfdx-url-auth :
309+ name : SFDX Auth URL (v2.1)
310+ runs-on : ubuntu-latest
311+ if : github.repository_owner == 'rdbumstead' || github.event_name == 'workflow_dispatch'
312+
313+ steps :
314+ - name : Checkout
315+ uses : actions/checkout@v4
316+
317+ - name : Setup with SFDX Auth URL
318+ id : setup-sfdx-url
319+ uses : ./
320+ with :
321+ auth_method : " sfdx-url"
322+ sfdx_auth_url : ${{ secrets.SFDX_AUTH_URL }}
323+
324+ - name : Verify SFDX URL Auth
325+ run : |
326+ echo "Testing SFDX Auth URL authentication..."
327+ sf org display
328+
329+ echo "Verifying outputs..."
330+ echo "Org ID: ${{ steps.setup-sfdx-url.outputs.org_id }}"
331+ echo "Auth Performed: ${{ steps.setup-sfdx-url.outputs.auth_performed }}"
332+ echo "API Version: ${{ steps.setup-sfdx-url.outputs.api_version }}"
333+
334+ if [ -z "${{ steps.setup-sfdx-url.outputs.org_id }}" ]; then
335+ echo "❌ org_id output is empty"
336+ exit 1
337+ fi
338+
339+ echo "✅ SFDX Auth URL authentication successful"
340+
341+ test-new-outputs :
342+ name : New Outputs (v2.1)
343+ runs-on : ubuntu-latest
344+ if : github.repository_owner == 'rdbumstead' || github.event_name == 'workflow_dispatch'
345+
346+ steps :
347+ - name : Checkout
348+ uses : actions/checkout@v4
349+
350+ - name : Setup Salesforce
351+ id : setup-sf
352+ uses : ./
353+ with :
354+ jwt_key : ${{ secrets.SFDX_JWT_KEY }}
355+ client_id : ${{ secrets.SFDX_CLIENT_ID }}
356+ username : ${{ vars.SFDX_USERNAME }}
357+
358+ - name : Verify New Outputs
359+ run : |
360+ echo "Testing new v2.1 outputs..."
361+
362+ echo "api_version: ${{ steps.setup-sf.outputs.api_version }}"
363+ echo "auth_performed: ${{ steps.setup-sf.outputs.auth_performed }}"
364+
365+ # Verify api_version is not empty
366+ if [ -z "${{ steps.setup-sf.outputs.api_version }}" ]; then
367+ echo "❌ api_version output is empty"
368+ exit 1
369+ fi
370+
371+ # Verify auth_performed is true
372+ if [ "${{ steps.setup-sf.outputs.auth_performed }}" != "true" ]; then
373+ echo "❌ auth_performed should be 'true'"
374+ exit 1
375+ fi
376+
377+ echo "✅ New outputs verified"
378+
274379 test-network-retry :
275380 name : Network Retry Logic
276381 runs-on : ubuntu-latest
@@ -376,6 +481,9 @@ jobs:
376481 - test-custom-alias
377482 - test-error-handling
378483 - test-cache-behavior
484+ - test-cache-granularity
485+ - test-sfdx-url-auth
486+ - test-new-outputs
379487 - test-network-retry
380488 - test-invalid-plugins
381489 - test-source-flags
@@ -462,6 +570,32 @@ jobs:
462570 echo "❌ **Source Flags Output**: Failed" >> $GITHUB_STEP_SUMMARY
463571 fi
464572
573+ echo "" >> $GITHUB_STEP_SUMMARY
574+ echo "### v2.1 Features" >> $GITHUB_STEP_SUMMARY
575+ echo "" >> $GITHUB_STEP_SUMMARY
576+
577+ if [ "${{ needs.test-cache-granularity.result }}" = "success" ]; then
578+ echo "✅ **Cache Granularity**: Passed" >> $GITHUB_STEP_SUMMARY
579+ else
580+ echo "❌ **Cache Granularity**: Failed" >> $GITHUB_STEP_SUMMARY
581+ fi
582+
583+ if [ "${{ needs.test-sfdx-url-auth.result }}" = "success" ]; then
584+ echo "✅ **SFDX Auth URL**: Passed" >> $GITHUB_STEP_SUMMARY
585+ elif [ "${{ needs.test-sfdx-url-auth.result }}" = "skipped" ]; then
586+ echo "⏭️ **SFDX Auth URL**: Skipped (no secrets)" >> $GITHUB_STEP_SUMMARY
587+ else
588+ echo "❌ **SFDX Auth URL**: Failed" >> $GITHUB_STEP_SUMMARY
589+ fi
590+
591+ if [ "${{ needs.test-new-outputs.result }}" = "success" ]; then
592+ echo "✅ **New Outputs (v2.1)**: Passed" >> $GITHUB_STEP_SUMMARY
593+ elif [ "${{ needs.test-new-outputs.result }}" = "skipped" ]; then
594+ echo "⏭️ **New Outputs (v2.1)**: Skipped (no secrets)" >> $GITHUB_STEP_SUMMARY
595+ else
596+ echo "❌ **New Outputs (v2.1)**: Failed" >> $GITHUB_STEP_SUMMARY
597+ fi
598+
465599 echo "" >> $GITHUB_STEP_SUMMARY
466600 echo "---" >> $GITHUB_STEP_SUMMARY
467601 echo "" >> $GITHUB_STEP_SUMMARY
@@ -502,6 +636,11 @@ jobs:
502636 CRITICAL_FAILED=true
503637 fi
504638
639+ if [ "${{ needs.test-cache-granularity.result }}" != "success" ]; then
640+ echo "❌ Critical test failed: Cache Granularity"
641+ CRITICAL_FAILED=true
642+ fi
643+
505644 if [ "$CRITICAL_FAILED" = true ]; then
506645 echo ""
507646 echo "❌ One or more critical tests failed"
0 commit comments