44 workflow_call :
55 inputs :
66 test-type :
7- description : ' Type of tests to run (unit, integration, e2e, performance)'
7+ description : ' Type of tests to run (unit, integration, e2e, performance, providers, infrastructure )'
88 required : true
99 type : string
10+ provider :
11+ description : ' When test-type=providers, scope the run to a single provider subtree (e.g. aws, k8s).'
12+ required : false
13+ type : string
14+ default : ' '
1015 python-version :
1116 description : ' Python version to test with'
1217 required : false
6570
6671jobs :
6772 test :
68- name : ${{ inputs.test-type == 'unit' && 'Unit Tests' || inputs.test-type == 'integration' && 'Integration Tests' || inputs.test-type == 'e2e' && 'End-to-End Tests' || format('{0} Tests', inputs.test-type) }}
73+ name : ${{ inputs.test-type == 'unit' && 'Unit Tests' || inputs.test-type == 'integration' && 'Integration Tests' || inputs.test-type == 'e2e' && 'End-to-End Tests' || (inputs.test-type == 'providers' && inputs.provider != '') && format('Providers Tests ({0})', inputs.provider) || format('{0} Tests', inputs.test-type) }}
6974 runs-on : ${{ inputs.os }}
7075 permissions :
7176 contents : read
@@ -81,14 +86,32 @@ jobs:
8186 fail-on-cache-miss : false
8287
8388 - name : Run tests
84- run : make ci-tests-${{ inputs.test-type }}
89+ id : run-tests
90+ run : make ci-tests-${{ inputs.test-type }} PROVIDER=${{ inputs.provider }}
8591 continue-on-error : ${{ inputs.continue-on-error }}
8692
93+ # When continue-on-error is true the overall job status stays green even
94+ # if tests fail, which can hide regressions in the PR summary view.
95+ # This step fires only on failure and writes a visible warning to the
96+ # GitHub job summary so operators notice the failure without digging into
97+ # the raw log.
98+ - name : Annotate soft failure in job summary
99+ if : steps.run-tests.outcome == 'failure'
100+ run : |
101+ echo "::warning::${{ inputs.test-type }} tests failed (continue-on-error=true). Review the test log for details."
102+ {
103+ echo "## :warning: ${{ inputs.test-type }} test failures"
104+ echo ""
105+ echo "The **${{ inputs.test-type }}** test suite reported failures."
106+ echo "Overall job status is still green because \`continue-on-error: true\` is set,"
107+ echo "but these failures should be investigated before merging."
108+ } >> "$GITHUB_STEP_SUMMARY"
109+
87110 - name : Upload test results
88111 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
89112 if : always()
90113 with :
91- name : test-results-${{ inputs.test-type }}-${{ inputs.os }}-py${{ inputs.python-version || inputs.default-python-version }}
114+ name : test-results-${{ inputs.test-type }}${{ inputs.provider != '' && format('-{0}', inputs.provider) || '' }} -${{ inputs.os }}-py${{ inputs.python-version || inputs.default-python-version }}
92115 retention-days : 30
93116 path : |
94117 junit-*.xml
@@ -100,14 +123,14 @@ jobs:
100123 uses : codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
101124 with :
102125 token : ${{ secrets.CODECOV_TOKEN }}
103- files : coverage-${{ inputs.test-type }}.xml
104- flags : ${{ inputs.test-type }}
105- name : ${{ inputs.test-type }}-tests
126+ files : coverage-${{ inputs.test-type }}${{ inputs.provider != '' && format('-{0}', inputs.provider) || '' }} .xml
127+ flags : ${{ inputs.test-type }}${{ inputs.provider != '' && format('-{0}', inputs.provider) || '' }}
128+ name : ${{ inputs.test-type }}${{ inputs.provider != '' && format('-{0}', inputs.provider) || '' }} -tests
106129
107130 - name : Upload test results to Codecov
108131 if : ${{ !cancelled() }}
109132 continue-on-error : true
110133 uses : codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
111134 with :
112135 token : ${{ secrets.CODECOV_TOKEN }}
113- files : junit-${{ inputs.test-type }}.xml
136+ files : junit-${{ inputs.test-type }}${{ inputs.provider != '' && format('-{0}', inputs.provider) || '' }} .xml
0 commit comments