Commit 035cba7
authored
🪲 [Fix]: Disable Debug dialogs for tests (#82)
## Description
This pull request includes several changes to GitHub Actions workflows
and the `action.yml` configuration. The changes aim to add new triggers,
update environment variable handling, and improve the clarity and
functionality of the debug and verbose settings.
### Workflow Triggers and Environment Variables:
*
[`.github/workflows/Action-Test-Src-Default.yml`](diffhunk://#diff-8ecb4765631346daa3fc827a56e509b7e8c1db0fc5ce7e3736bfea19531c0779L5-R9):
Added `workflow_dispatch` and `schedule` triggers, and updated the
`Status` job to use environment variables for the `PASSED` output.
[[1]](diffhunk://#diff-8ecb4765631346daa3fc827a56e509b7e8c1db0fc5ce7e3736bfea19531c0779L5-R9)
[[2]](diffhunk://#diff-8ecb4765631346daa3fc827a56e509b7e8c1db0fc5ce7e3736bfea19531c0779L37-R48)
*
[`.github/workflows/Action-Test-Src-WithManifest.yml`](diffhunk://#diff-6b415bfca4385019a4a012a0677a3f583897f8c0ed23335673a87fc7962f0aecL5-R9):
Added `workflow_dispatch` and `schedule` triggers, and updated the
`Status` job to use environment variables for the `PASSED` output.
[[1]](diffhunk://#diff-6b415bfca4385019a4a012a0677a3f583897f8c0ed23335673a87fc7962f0aecL5-R9)
[[2]](diffhunk://#diff-6b415bfca4385019a4a012a0677a3f583897f8c0ed23335673a87fc7962f0aecR44-R48)
*
[`.github/workflows/Action-Test-outputs.yml`](diffhunk://#diff-0d613011b57a43efc563d0da352dd07193e4d4c51d18b3960d164386b56500c9L5-R9):
Added `workflow_dispatch` and `schedule` triggers, and updated the
`Status` job to use environment variables for the `PASSED` output.
[[1]](diffhunk://#diff-0d613011b57a43efc563d0da352dd07193e4d4c51d18b3960d164386b56500c9L5-R9)
[[2]](diffhunk://#diff-0d613011b57a43efc563d0da352dd07193e4d4c51d18b3960d164386b56500c9R44-R48)
### Action Configuration:
*
[`action.yml`](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L25-L51):
Changed the default values for `StackTraceVerbosity` and added new
inputs for `Debug`, `Verbose`, `Version`, and `Prerelease`. Updated the
`runs` section to use these new inputs.
[[1]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L25-L51)
[[2]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L60-R71)
### Script Updates:
*
[`scripts/helpers/Test-PSModule.ps1`](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L76-R77):
Removed the handling of `VerbosePreference` and `DebugPreference`
environment variables, setting `Debug` and `Verbose` to `false` by
default. (Ffc65297L56R56,
[[1]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L76-R77)
[[2]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L91-R92)
[[3]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L108-R109)
[[4]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L123-L124)
[[5]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L144-R144)
[[6]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L159-L161)
[[7]](diffhunk://#diff-2100eb52126417766eeb5b98f9c6a0da1dd10302b3b7c05d476295e3bd76ce76L187-L193)
*
[`scripts/main.ps1`](diffhunk://#diff-dc2e5a659836b1b73abb03421c567f5018c2755677c4a0aa764cb26117b68011L59-R68):
Updated the script to set the GitHub output for `passed` based on the
number of failed tests and exit with the count of failed tests.
### Test Scripts:
*
[`scripts/tests/PSModule/Module.Tests.ps1`](diffhunk://#diff-48702d5fcb50be6ea65629693b0ea1148719b628d5f825228220aac8230d742eL23-R43):
Removed redundant `-Verbose` flags from `Write-Verbose` calls.
*
[`scripts/tests/PSModule/SourceCode.Tests.ps1`](diffhunk://#diff-fac42e72562e6968b058e80b8aa9f1f6e542a372a5aec978297f34464edc4e64L18-R18):
Removed redundant `-Verbose` flags from `Write-Verbose` calls.
[[1]](diffhunk://#diff-fac42e72562e6968b058e80b8aa9f1f6e542a372a5aec978297f34464edc4e64L18-R18)
[[2]](diffhunk://#diff-fac42e72562e6968b058e80b8aa9f1f6e542a372a5aec978297f34464edc4e64L30-R32)
### Module Script Updates:
*
[`tests/outputs/modules/PSModuleTest/PSModuleTest.psm1`](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7L27-R29):
Added `Write-Debug` and `Write-Verbose` messages, and updated
`Set-PSModuleTest` to support `ShouldProcess`. Removed redundant
`-Verbose` flags from `Write-Verbose` calls.
[[1]](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7L27-R29)
[[2]](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7R270-R271)
[[3]](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7R302-R303)
[[4]](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7L322-R337)
[[5]](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7R360-R361)
[[6]](diffhunk://#diff-34f1c18d0e8aa3e7c0bef371f694885466666ae95b30af7f635b0177223aa4a7L364-R376)
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [x] 🪲 [Fix]
- [ ] 🩹 [Patch]
- [ ] 1 parent 3fa68e2 commit 035cba7
File tree
12 files changed
+100
-87
lines changed- .github/workflows
- scripts
- helpers
- tests/PSModule
- tests
- outputs/modules/PSModuleTest
- scripts
- src/functions/public
12 files changed
+100
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | | - | |
38 | | - | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
42 | | - | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
| |||
141 | 139 | | |
142 | 140 | | |
143 | 141 | | |
144 | | - | |
145 | | - | |
146 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
| |||
156 | 154 | | |
157 | 155 | | |
158 | 156 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 157 | | |
163 | 158 | | |
164 | 159 | | |
| |||
184 | 179 | | |
185 | 180 | | |
186 | 181 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 182 | | |
192 | | - | |
193 | | - | |
194 | 183 | | |
195 | 184 | | |
196 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
68 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments