Skip to content

Commit 5afbc7c

Browse files
wphillipmoorewphillipmoore-claude
andauthored
chore(ci): standardize CI gate configuration (#344)
Remove push and release/** triggers (branch protection enforces PRs). Convert security and integration jobs from job-level if to per-step if guards for docs-only gating, ensuring required status checks remain visible. Co-authored-by: wphillipmoore-claude <255925739+wphillipmoore-claude@users.noreply.github.com>
1 parent abc270f commit 5afbc7c

1 file changed

Lines changed: 27 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: CI - Test and Validate
22

33
on:
44
pull_request:
5-
push:
6-
branches:
7-
- develop
8-
- 'release/**'
95

106
permissions:
117
contents: read
@@ -185,14 +181,19 @@ jobs:
185181
name: "security: codeql"
186182
runs-on: ubuntu-latest
187183
needs: docs-only
188-
if: needs.docs-only.outputs.docs-only != 'true'
189184
permissions:
190185
security-events: write
191186
steps:
187+
- name: Docs-only short-circuit
188+
if: needs.docs-only.outputs.docs-only == 'true'
189+
run: echo "Docs-only changes detected; skipping CodeQL."
190+
192191
- name: Checkout code
192+
if: needs.docs-only.outputs.docs-only != 'true'
193193
uses: actions/checkout@v6
194194

195195
- name: Run CodeQL analysis
196+
if: needs.docs-only.outputs.docs-only != 'true'
196197
uses: wphillipmoore/standard-actions/actions/security/codeql@develop
197198
with:
198199
language: python
@@ -201,14 +202,19 @@ jobs:
201202
name: "security: trivy"
202203
runs-on: ubuntu-latest
203204
needs: docs-only
204-
if: needs.docs-only.outputs.docs-only != 'true'
205205
permissions:
206206
security-events: write
207207
steps:
208+
- name: Docs-only short-circuit
209+
if: needs.docs-only.outputs.docs-only == 'true'
210+
run: echo "Docs-only changes detected; skipping Trivy."
211+
208212
- name: Checkout code
213+
if: needs.docs-only.outputs.docs-only != 'true'
209214
uses: actions/checkout@v6
210215

211216
- name: Run Trivy vulnerability scan
217+
if: needs.docs-only.outputs.docs-only != 'true'
212218
uses: wphillipmoore/standard-actions/actions/security/trivy@develop
213219
with:
214220
scan-type: fs
@@ -217,14 +223,19 @@ jobs:
217223
name: "security: semgrep"
218224
runs-on: ubuntu-latest
219225
needs: docs-only
220-
if: needs.docs-only.outputs.docs-only != 'true'
221226
permissions:
222227
security-events: write
223228
steps:
229+
- name: Docs-only short-circuit
230+
if: needs.docs-only.outputs.docs-only == 'true'
231+
run: echo "Docs-only changes detected; skipping Semgrep."
232+
224233
- name: Checkout code
234+
if: needs.docs-only.outputs.docs-only != 'true'
225235
uses: actions/checkout@v6
226236

227237
- name: Run Semgrep SAST scan
238+
if: needs.docs-only.outputs.docs-only != 'true'
228239
uses: wphillipmoore/standard-actions/actions/security/semgrep@develop
229240
with:
230241
language: python
@@ -233,25 +244,33 @@ jobs:
233244
name: "test: integration"
234245
runs-on: ubuntu-latest
235246
needs: docs-only
236-
if: needs.docs-only.outputs.docs-only != 'true'
237247
steps:
248+
- name: Docs-only short-circuit
249+
if: needs.docs-only.outputs.docs-only == 'true'
250+
run: echo "Docs-only changes detected; skipping integration tests."
251+
238252
- name: Checkout code
253+
if: needs.docs-only.outputs.docs-only != 'true'
239254
uses: actions/checkout@v6
240255

241256
- name: Set up Python
257+
if: needs.docs-only.outputs.docs-only != 'true'
242258
uses: wphillipmoore/standard-actions/actions/python/setup@develop
243259
with:
244260
python-version: "3.14"
245261

246262
- name: Install dependencies
263+
if: needs.docs-only.outputs.docs-only != 'true'
247264
run: uv sync --frozen --group dev
248265

249266
- name: Setup MQ environment
267+
if: needs.docs-only.outputs.docs-only != 'true'
250268
uses: wphillipmoore/mq-rest-admin-dev-environment/.github/actions/setup-mq@main
251269
with:
252270
project-name: pymqrest
253271

254272
- name: Run integration tests
273+
if: needs.docs-only.outputs.docs-only != 'true'
255274
run: |
256275
MQ_SKIP_LIFECYCLE=1 \
257276
PYMQREST_RUN_INTEGRATION=1 \

0 commit comments

Comments
 (0)