@@ -145,10 +145,102 @@ jobs:
145145 consumer/pytest-output-candidate.txt
146146 if-no-files-found : ignore
147147
148+ consumer-test-latest-release :
149+ name : consumer-test-latest-release
150+ if : github.event_name == 'pull_request'
151+ needs : build-wheel
152+ runs-on : ubuntu-latest
153+
154+ services :
155+ redis :
156+ image : redis
157+ ports :
158+ - 6379:6379
159+ options : >-
160+ --health-cmd "redis-cli ping"
161+ --health-interval 10s
162+ --health-timeout 5s
163+ --health-retries 5
164+
165+ strategy :
166+ fail-fast : false
167+ matrix :
168+ include :
169+ - name : fastapi-guard
170+ repo : rennf93/fastapi-guard
171+ sync_extra : ' --extra dev'
172+ pytest_args : ' -v --cov=guard --cov-branch'
173+ redis_prefix : ' test:fastapi_guard:'
174+ - name : flaskapi-guard
175+ repo : rennf93/flaskapi-guard
176+ sync_extra : ' --extra dev'
177+ pytest_args : ' -v --cov=flaskapi_guard'
178+ redis_prefix : ' test:flaskapi_guard:'
179+ - name : djapi-guard
180+ repo : rennf93/djapi-guard
181+ sync_extra : ' --extra dev'
182+ pytest_args : ' -v --cov=djangoapi_guard'
183+ redis_prefix : ' test:djangoapi_guard:'
184+ - name : guard-agent
185+ repo : rennf93/guard-agent
186+ sync_extra : ' --extra dev'
187+ pytest_args : ' -v --cov=guard_agent'
188+ redis_prefix : ' '
189+ - name : guard-core-mcp
190+ repo : rennf93/guard-core-mcp
191+ sync_extra : ' --extra dev'
192+ pytest_args : ' -v --cov=guard_core_mcp --cov-branch'
193+ redis_prefix : ' '
194+
195+ env :
196+ IPINFO_TOKEN : test_token
197+ REDIS_URL : redis://localhost:6379
198+ GH_TOKEN : ${{ github.token }}
199+
200+ steps :
201+ - name : Checkout code
202+ uses : actions/checkout@v7
203+
204+ - name : Download the PR wheel
205+ uses : actions/download-artifact@v8
206+ with :
207+ name : guard-core-wheel
208+ path : dist
209+
210+ - name : Set up Python
211+ uses : actions/setup-python@v7
212+ with :
213+ python-version : ' 3.10'
214+
215+ - name : Install uv
216+ run : |
217+ pip install uv
218+
219+ - name : Test ${{ matrix.name }} against the PR wheel (latest-release)
220+ run : |
221+ .github/scripts/ecosystem_gate.sh \
222+ "${{ matrix.repo }}" \
223+ "${{ matrix.sync_extra }}" \
224+ "${{ matrix.pytest_args }}" \
225+ "$PWD/dist" \
226+ "${{ needs.build-wheel.outputs.version }}" \
227+ "${{ matrix.redis_prefix }}" \
228+ "latest-release"
229+
230+ - name : Upload pytest output
231+ if : failure()
232+ uses : actions/upload-artifact@v7
233+ with :
234+ name : ${{ matrix.name }}-latest-release-pytest-output
235+ path : |
236+ consumer/pytest-output-base.txt
237+ consumer/pytest-output-candidate.txt
238+ if-no-files-found : ignore
239+
148240 ecosystem-gate :
149241 name : ecosystem-gate
150242 runs-on : ubuntu-latest
151- needs : [consumer-test]
243+ needs : [consumer-test, consumer-test-latest-release ]
152244 if : always()
153245 steps :
154246 - name : Fail when any consumer job failed
@@ -157,4 +249,8 @@ jobs:
157249 echo "::error::consumer-test result: ${{ needs.consumer-test.result }}"
158250 exit 1
159251 fi
252+ if [ "${{ github.event_name }}" = "pull_request" ] && [ "${{ needs.consumer-test-latest-release.result }}" != "success" ]; then
253+ echo "::error::consumer-test-latest-release result: ${{ needs.consumer-test-latest-release.result }}"
254+ exit 1
255+ fi
160256 echo "all consumer jobs passed"
0 commit comments