Skip to content

Commit 6cf0b55

Browse files
🩹 [Patch]: Add PSModule/Debug steps when Debug: true (#76)
## Description This pull request introduces several changes to the GitHub Actions workflows to add a debug step to every job if the `Debug` input is enabled. It also updates the `README.md` to reflect this change. Below are the most important changes: ### Workflow Updates: * Added a `Debug` step to multiple jobs in the `.github/workflows/CI.yml` file, which uses the `PSModule/Debug@v0` action and is conditional on the `Debug` input. [[1]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R109-R112) [[2]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R141-R144) [[3]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R173-R176) [[4]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R209-R212) [[5]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R245-R248) [[6]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R297-R300) [[7]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R351-R354) [[8]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R404-R407) [[9]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R528-R531) [[10]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R572-R575) * Added a `Debug` step to multiple jobs in the `.github/workflows/workflow.yml` file, which uses the `PSModule/Debug@v0` action and is conditional on the `Debug` input. [[1]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R116-R119) [[2]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R148-R151) [[3]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R180-R183) [[4]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R216-R219) [[5]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R252-R255) [[6]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R304-R307) [[7]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R358-R361) [[8]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R411-R414) [[9]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R548-R551) [[10]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R601-R604) [[11]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R714-R717) [[12]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R758-R761) * Updated the `Test built module` step in both `.github/workflows/CI.yml` and `.github/workflows/workflow.yml` to include `DYLD_PRINT_LIBRARIES` environment variable if `Debug` input is enabled. [[1]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R318-R319) [[2]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1R325-R326) ### Documentation Update: * Updated the `README.md` file to clarify that enabling the `Debug` input adds a `debug` step to every job. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas
1 parent c1faa05 commit 6cf0b55

File tree

3 files changed

+93
-4
lines changed

3 files changed

+93
-4
lines changed

.github/workflows/CI.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ jobs:
106106
- name: Checkout Code
107107
uses: actions/checkout@v4
108108

109+
- name: Debug
110+
if: ${{ inputs.Debug }}
111+
uses: PSModule/Debug@v0
112+
109113
- name: Initialize environment
110114
uses: PSModule/Initialize-PSModule@v1
111115
with:
@@ -134,6 +138,10 @@ jobs:
134138
- name: Checkout Code
135139
uses: actions/checkout@v4
136140

141+
- name: Debug
142+
if: ${{ inputs.Debug }}
143+
uses: PSModule/Debug@v0
144+
137145
- name: Initialize environment
138146
uses: PSModule/Initialize-PSModule@v1
139147
with:
@@ -162,6 +170,10 @@ jobs:
162170
- name: Checkout Code
163171
uses: actions/checkout@v4
164172

173+
- name: Debug
174+
if: ${{ inputs.Debug }}
175+
uses: PSModule/Debug@v0
176+
165177
- name: Initialize environment
166178
uses: PSModule/Initialize-PSModule@v1
167179
with:
@@ -194,6 +206,10 @@ jobs:
194206
- name: Checkout Code
195207
uses: actions/checkout@v4
196208

209+
- name: Debug
210+
if: ${{ inputs.Debug }}
211+
uses: PSModule/Debug@v0
212+
197213
- name: Initialize environment
198214
uses: PSModule/Initialize-PSModule@v1
199215
with:
@@ -226,6 +242,10 @@ jobs:
226242
- name: Checkout Code
227243
uses: actions/checkout@v4
228244

245+
- name: Debug
246+
if: ${{ inputs.Debug }}
247+
uses: PSModule/Debug@v0
248+
229249
- name: Initialize environment
230250
uses: PSModule/Initialize-PSModule@v1
231251
with:
@@ -274,6 +294,10 @@ jobs:
274294
- name: Checkout Code
275295
uses: actions/checkout@v4
276296

297+
- name: Debug
298+
if: ${{ inputs.Debug }}
299+
uses: PSModule/Debug@v0
300+
277301
- name: Initialize environment
278302
uses: PSModule/Initialize-PSModule@v1
279303
with:
@@ -291,6 +315,8 @@ jobs:
291315
- name: Test built module
292316
id: test
293317
uses: PSModule/Test-PSModule@v2
318+
env:
319+
DYLD_PRINT_LIBRARIES: ${{ inputs.Debug }}
294320
continue-on-error: true
295321
with:
296322
Name: ${{ inputs.Name }}
@@ -322,6 +348,10 @@ jobs:
322348
- name: Checkout Code
323349
uses: actions/checkout@v4
324350

351+
- name: Debug
352+
if: ${{ inputs.Debug }}
353+
uses: PSModule/Debug@v0
354+
325355
- name: Initialize environment
326356
uses: PSModule/Initialize-PSModule@v1
327357
with:
@@ -371,6 +401,10 @@ jobs:
371401
- name: Checkout Code
372402
uses: actions/checkout@v4
373403

404+
- name: Debug
405+
if: ${{ inputs.Debug }}
406+
uses: PSModule/Debug@v0
407+
374408
- name: Initialize environment
375409
uses: PSModule/Initialize-PSModule@v1
376410
with:
@@ -491,6 +525,10 @@ jobs:
491525
fetch-depth: 0
492526
ref: ${{ github.event.pull_request.head.sha }}
493527

528+
- name: Debug
529+
if: ${{ inputs.Debug }}
530+
uses: PSModule/Debug@v0
531+
494532
- name: Download docs artifact
495533
uses: actions/download-artifact@v4
496534
with:
@@ -531,6 +569,10 @@ jobs:
531569
fetch-depth: 0
532570
ref: ${{ github.event.pull_request.head.sha }}
533571

572+
- name: Debug
573+
if: ${{ inputs.Debug }}
574+
uses: PSModule/Debug@v0
575+
534576
- name: Initialize environment
535577
uses: PSModule/Initialize-PSModule@v1
536578
with:

.github/workflows/workflow.yml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ jobs:
113113
- name: Checkout Code
114114
uses: actions/checkout@v4
115115

116+
- name: Debug
117+
if: ${{ inputs.Debug }}
118+
uses: PSModule/Debug@v0
119+
116120
- name: Initialize environment
117121
uses: PSModule/Initialize-PSModule@v1
118122
with:
@@ -141,6 +145,10 @@ jobs:
141145
- name: Checkout Code
142146
uses: actions/checkout@v4
143147

148+
- name: Debug
149+
if: ${{ inputs.Debug }}
150+
uses: PSModule/Debug@v0
151+
144152
- name: Initialize environment
145153
uses: PSModule/Initialize-PSModule@v1
146154
with:
@@ -169,6 +177,10 @@ jobs:
169177
- name: Checkout Code
170178
uses: actions/checkout@v4
171179

180+
- name: Debug
181+
if: ${{ inputs.Debug }}
182+
uses: PSModule/Debug@v0
183+
172184
- name: Initialize environment
173185
uses: PSModule/Initialize-PSModule@v1
174186
with:
@@ -201,6 +213,10 @@ jobs:
201213
- name: Checkout Code
202214
uses: actions/checkout@v4
203215

216+
- name: Debug
217+
if: ${{ inputs.Debug }}
218+
uses: PSModule/Debug@v0
219+
204220
- name: Initialize environment
205221
uses: PSModule/Initialize-PSModule@v1
206222
with:
@@ -233,6 +249,10 @@ jobs:
233249
- name: Checkout Code
234250
uses: actions/checkout@v4
235251

252+
- name: Debug
253+
if: ${{ inputs.Debug }}
254+
uses: PSModule/Debug@v0
255+
236256
- name: Initialize environment
237257
uses: PSModule/Initialize-PSModule@v1
238258
with:
@@ -281,6 +301,10 @@ jobs:
281301
- name: Checkout Code
282302
uses: actions/checkout@v4
283303

304+
- name: Debug
305+
if: ${{ inputs.Debug }}
306+
uses: PSModule/Debug@v0
307+
284308
- name: Initialize environment
285309
uses: PSModule/Initialize-PSModule@v1
286310
with:
@@ -298,6 +322,8 @@ jobs:
298322
- name: Test built module
299323
id: test
300324
uses: PSModule/Test-PSModule@v2
325+
env:
326+
DYLD_PRINT_LIBRARIES: ${{ inputs.Debug }}
301327
continue-on-error: true
302328
with:
303329
Name: ${{ inputs.Name }}
@@ -329,6 +355,10 @@ jobs:
329355
- name: Checkout Code
330356
uses: actions/checkout@v4
331357

358+
- name: Debug
359+
if: ${{ inputs.Debug }}
360+
uses: PSModule/Debug@v0
361+
332362
- name: Initialize environment
333363
uses: PSModule/Initialize-PSModule@v1
334364
with:
@@ -378,6 +408,10 @@ jobs:
378408
- name: Checkout Code
379409
uses: actions/checkout@v4
380410

411+
- name: Debug
412+
if: ${{ inputs.Debug }}
413+
uses: PSModule/Debug@v0
414+
381415
- name: Initialize environment
382416
uses: PSModule/Initialize-PSModule@v1
383417
with:
@@ -511,6 +545,10 @@ jobs:
511545
fetch-depth: 0
512546
ref: ${{ github.event.pull_request.head.sha }}
513547

548+
- name: Debug
549+
if: ${{ inputs.Debug }}
550+
uses: PSModule/Debug@v0
551+
514552
- name: Initialize environment
515553
uses: PSModule/Initialize-PSModule@v1
516554
with:
@@ -560,6 +598,10 @@ jobs:
560598
fetch-depth: 0
561599
ref: ${{ github.event.pull_request.head.sha }}
562600

601+
- name: Debug
602+
if: ${{ inputs.Debug }}
603+
uses: PSModule/Debug@v0
604+
563605
- name: Initialize environment
564606
uses: PSModule/Initialize-PSModule@v1
565607
with:
@@ -574,9 +616,6 @@ jobs:
574616
name: docs
575617
path: '${{ inputs.SiteOutputPath }}/docs/Functions'
576618

577-
- name: Debug
578-
uses: PSModule/Debug@v0
579-
580619
- uses: actions/configure-pages@v5
581620

582621
- name: Install mkdoks-material
@@ -672,6 +711,10 @@ jobs:
672711
- name: Checkout Code
673712
uses: actions/checkout@v4
674713

714+
- name: Debug
715+
if: ${{ inputs.Debug }}
716+
uses: PSModule/Debug@v0
717+
675718
- name: Initialize environment
676719
uses: PSModule/Initialize-PSModule@v1
677720
with:
@@ -712,6 +755,10 @@ jobs:
712755
url: ${{ steps.deployment.outputs.page_url }}
713756
runs-on: ubuntu-latest
714757
steps:
758+
- name: Debug
759+
if: ${{ inputs.Debug }}
760+
uses: PSModule/Debug@v0
761+
715762
- name: Deploy to GitHub Pages
716763
id: deployment
717764
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
| `TestProcess` | `boolean` | Whether to test the process. | `false` | `false` |
8080
| `Version` | `string` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | N/A |
8181
| `Prerelease` | `boolean` | Whether to use a prerelease version of the 'GitHub' module. | `false` | `false` |
82-
| `Debug` | `boolean` | Whether to enable debug output. | `false` | `false` |
82+
| `Debug` | `boolean` | Whether to enable debug output. Adds a `debug` step to every job. | `false` | `false` |
8383
| `Verbose` | `boolean` | Whether to enable verbose output. | `false` | `false` |
8484

8585
### Secrets

0 commit comments

Comments
 (0)