@suffolklitlab/alkiln 5.13.2 → 5.13.3-feat-random-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.github/workflows/github_server.yml +10 -8
  2. package/.github/workflows/playground.yml +5 -2
  3. package/.github/workflows/unit_tests.yml +1 -1
  4. package/CHANGELOG.md +32 -1
  5. package/_alkiln_meta/shift_logs.js +75 -0
  6. package/action.yml +89 -31
  7. package/action_for_github_server/action.yml +65 -29
  8. package/docs/4_environments.md +243 -0
  9. package/docs/artifacts_folder_name.md +135 -0
  10. package/docs/constrained_random_tests.md +254 -0
  11. package/docs/decisions/006_which_log_level_to_pick_2024_09_5.md +70 -0
  12. package/docs/decisions/007_getting_and_storing_logs.md +179 -0
  13. package/docs/decisions/move_runtime_config_to_sources_folder.md +5 -0
  14. package/docs/decisions/reports_and_logs_2024_08_11.md +161 -0
  15. package/docs/kinds_of_errors.md +26 -0
  16. package/docs/prioritize_constrained_random_tests.md +60 -0
  17. package/lib/docassemble/docassemble_api_interface.js +77 -51
  18. package/lib/docassemble/server_install.js +32 -9
  19. package/lib/docassemble/setup.js +40 -25
  20. package/lib/docassemble/takedown.js +33 -10
  21. package/lib/globals.js +10 -0
  22. package/lib/run_cucumber.js +141 -69
  23. package/lib/scope.js +101 -77
  24. package/lib/setup/TestGenerator.js +1755 -0
  25. package/lib/setup/artifacts.js +20 -0
  26. package/lib/setup/generate.js +42 -0
  27. package/lib/setup/get_Gherkin_AST.js +26 -0
  28. package/lib/setup/validate.js +89 -0
  29. package/lib/steps.js +132 -54
  30. package/lib/utils/Log.js +1145 -0
  31. package/lib/utils/_alkiln-constrained_random_tests_old.js +1776 -0
  32. package/lib/utils/files.js +18 -11
  33. package/lib/utils/get_error_stacks.js +16 -0
  34. package/lib/utils/reports.js +100 -34
  35. package/lib/utils/session_vars.js +107 -73
  36. package/lib/utils/set_sources_paths.js +98 -0
  37. package/lib/utils/time.js +44 -0
  38. package/package.json +18 -7
  39. package/tests/log_codes/check_codes.sh +18 -13
  40. package/tests/log_codes/log_code_expected_instances.txt +91 -9
  41. package/tests/unit_tests/constrained_random_answers/invalid.fixtures.js +177 -0
  42. package/tests/unit_tests/constrained_random_answers/invalid.test.js +251 -0
  43. package/tests/unit_tests/constrained_random_answers/valid.fixtures.js +936 -0
  44. package/tests/unit_tests/constrained_random_answers/valid.test.js +541 -0
  45. package/tests/unit_tests/example_of_chai_test_lifecycle.js +78 -0
  46. package/tests/unit_tests/getAllFields.test.js +5 -0
  47. package/tests/unit_tests/getMatchingRows.test.js +5 -0
  48. package/tests/unit_tests/log.test.js +557 -0
  49. package/tests/unit_tests/normalizeTable.test.js +5 -0
  50. package/lib/utils/log.js +0 -96
  51. /package/docs/{expected_inernal_results.md → expected_internal_results.md} +0 -0
@@ -45,15 +45,15 @@ jobs:
45
45
  #### keyword or values at all. See
46
46
  #### https://assemblyline.suffolklitlab.org/docs/alkiln/writing#env-vars
47
47
  env:
48
- SECRET_VAR1: secret-var1-value
49
- SECRET_VAR2: secret-var2-value
50
- SECRET_FOR_MISSING_FIELD: secret for missing field
51
- INVALID_API_KEY: invalidAPIkey
52
- EMPTY_STRING: ""
53
48
  NORMAL_USER_EMAIL: alkiln@example.com
54
49
  NORMAL_USER_PASSWORD: User123^
55
50
  WRONG_EMAIL: wrong_email@example.com
56
51
  WRONG_PASSWORD: wrong_password
52
+ INVALID_API_KEY: invalidAPIkey
53
+ EMPTY_STRING: ""
54
+ SECRET_VAR1: secret-var1-value
55
+ SECRET_VAR2: secret-var2-value
56
+ SECRET_FOR_MISSING_FIELD: secret for missing field
57
57
 
58
58
  steps:
59
59
  # Place the root directory in this branch to access
@@ -159,8 +159,10 @@ jobs:
159
159
  INSTALL_METHOD: "server"
160
160
  #### Developer note: You can probably leave the rest out
161
161
  #### To learn more, see https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#optional-inputs
162
- ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
163
- ALKILN_VERSION: download
162
+ #ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
163
+ # Temp debugging GitHub multi-folder problem
164
+ ALKILN_TAG_EXPRESSION: "@rp1"
165
+ ALKILN_VERSION: random
164
166
 
165
167
  #### Developer note: Example of making an issue when tests fail
166
168
  #### that includes the text of the failure output file
@@ -169,7 +171,7 @@ jobs:
169
171
  if: ${{ failure() }}
170
172
  env:
171
173
  GH_TOKEN: ${{ github.token }}
172
- PATH_TO_REPORT_FILE: "${{ steps.alkiln.outputs.PATH_TO_REPORT_FILE }}"
174
+ PATH_TO_REPORT_LOG_FILE: "${{ steps.alkiln.outputs.PATH_TO_REPORT_LOG_FILE }}"
173
175
  PATH_TO_UNEXPECTED_RESULTS_FILE: "${{ steps.alkiln.outputs.PATH_TO_UNEXPECTED_RESULTS_FILE }}"
174
176
  PATH_TO_DEBUG_LOG_FILE: "${{ steps.alkiln.outputs.PATH_TO_DEBUG_LOG_FILE }}"
175
177
  run: |
@@ -76,9 +76,12 @@ jobs:
76
76
  DOCASSEMBLE_DEVELOPER_API_KEY: "${{ env.DOCASSEMBLE_DEVELOPER_API_KEY }}"
77
77
  #### Developer note: See https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#optional-inputs
78
78
  #### You can probably leave this out
79
+ MAX_RANDOM_TESTS_PER_SCENARIO: 10
79
80
  # Internal: docassemble changes sometimes break @a11y tests. That is
80
81
  # a da problem, not ours. We will trigger these tests manually when we
81
82
  # want to check up on this.
82
- ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
83
+ #ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
84
+ # Temp debugging GitHub multi-folder problem
85
+ ALKILN_TAG_EXPRESSION: "@rp1"
83
86
  #### Developer note: You can probably leave this out
84
- ALKILN_VERSION: download
87
+ ALKILN_VERSION: random
@@ -27,7 +27,7 @@ jobs:
27
27
  - run: npm run unit
28
28
  # Artifacts
29
29
  - name: upload unit tests artifacts folder
30
- uses: actions/upload-artifact@v3
30
+ uses: actions/upload-artifact@v4
31
31
  # This will upload even if a previous step has failed
32
32
  if: ${{ always() }}
33
33
  with:
package/CHANGELOG.md CHANGED
@@ -43,11 +43,36 @@ Format:
43
43
  -
44
44
  -->
45
45
 
46
- ## [Unreleased]
46
+ <!-- ## [Unreleased] -->
47
+
48
+ ## [5.13.4] - 2025-01-11
49
+
50
+ ### Changed
51
+
52
+ - Removed an extraneous log
53
+
54
+ ### Fixed
55
+
56
+ - Final error showed an undefined var instead of a more useful error message
57
+
58
+ ### Internal
59
+
60
+ - Refactored `log` into a class that works with ALKiln's 4 possible environments
61
+ - Refactored `Log` class to handle throwing errors
62
+ - Now store debug information in debug log instead of printing it live
63
+ - Removed debug flag so debug logs always get stored
64
+ - Added decision/design docs
65
+
66
+ ## [5.13.3] - 2025-01-05
67
+
68
+ ### Fixed
69
+
70
+ - Updates to latest docassemble HTML. See [#960](https://github.com/SuffolkLITLab/ALKiln/issues/960). Changes all appearances of `fieldset` to keep the code consistent.
47
71
 
48
72
  ## [5.13.2] - 2024-11-23
49
73
 
50
74
  ### Fixed
75
+
51
76
  - Fixes download Step unable to use a partial filename match. The Step needed the whole name, including the extension. See [#725](https://github.com/SuffolkLITLab/ALKiln/issues/725).
52
77
 
53
78
  ## [5.13.1] - 2024-10-23
@@ -59,6 +84,8 @@ Format:
59
84
  ### Fixed
60
85
 
61
86
  - Detects failed sign in. Closes [#918](https://github.com/SuffolkLITLab/ALKiln/issues/918).
87
+ - Fixes undefined `errors` var in `After()`
88
+ - Closes [#924](https://github.com/SuffolkLITLab/ALKiln/issues/924), remove extra interview url print
62
89
 
63
90
  ### Internal
64
91
 
@@ -69,6 +96,10 @@ Format:
69
96
  - Adds decision docs
70
97
  - Updated CONTRIBUTING.md
71
98
  - Added example.env, closes [#374](https://github.com/SuffolkLITLab/ALKiln/issues/374)
99
+ - Closes [#805](https://github.com/SuffolkLITLab/ALKiln/issues/805), create verbose-type log
100
+ - Closes [#659](https://github.com/SuffolkLITLab/ALKiln/issues/659), abstract adding to debug_log
101
+ - Closes [#925](https://github.com/SuffolkLITLab/ALKiln/issues/925), allow a `Log` to throw an error
102
+ - Addresses [#461](https://github.com/SuffolkLITLab/ALKiln/issues/461), setup and takedown reports
72
103
  - Updates pdfjs-dist for node v20 and v22. See [#952](https://github.com/SuffolkLITLab/ALKiln/issues/952).
73
104
 
74
105
  ## [5.13.0] - 2024-07-11
@@ -0,0 +1,75 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ function shift_logs(folderPath, startNum, endNum) {
5
+ // Validate inputs
6
+ if (!folderPath || typeof folderPath !== 'string') {
7
+ throw new Error('Invalid folder path provided');
8
+ }
9
+ if (!startNum || !endNum || isNaN(startNum) || isNaN(endNum)) {
10
+ throw new Error('Invalid number range provided');
11
+ }
12
+
13
+ // Process directory recursively
14
+ function processDirectory(dirPath) {
15
+ // Read all files in the folder
16
+ const files = fs.readdirSync(dirPath);
17
+
18
+ files.forEach(file => {
19
+ const some_path = path.join(dirPath, file);
20
+ const stats = fs.statSync(some_path);
21
+
22
+ if (stats.isDirectory()) {
23
+ // Recursively process subdirectories
24
+ processDirectory(some_path);
25
+ } else if (stats.isFile()) {
26
+ // Only process supported file paths
27
+ if ( some_path.startsWith(`.`) || some_path.startsWith(`alkiln`) || some_path.startsWith(`_`)) {
28
+ console.log(`not editing`, some_path);
29
+ return;
30
+ }
31
+ if (some_path.match(/(node_modules)|(_alkiln)|(package)|(shrinkwrap)|(runtime)|(alkiln\-)$/)) {
32
+ console.log(`not editing`, some_path);
33
+ return;
34
+ }
35
+
36
+ let content = fs.readFileSync(some_path, 'utf8');
37
+
38
+ // Create regex pattern for ALK followed by digits
39
+ const pattern = /\bALK0(\d+)\b/g;
40
+
41
+ // Process matches and adjust numbers
42
+ content = content.replace(pattern, (match, numStr) => {
43
+ console.log(`match in ${ some_path }:`, JSON.stringify(match) );
44
+
45
+ const num = parseInt(numStr);
46
+ // Only modify numbers within our target range
47
+ if (num >= startNum && num <= endNum) {
48
+ console.log(`Changing match: previous content:`);
49
+ console.log( content );
50
+ return `ALK0${num + 1}`;
51
+ }
52
+ return match;
53
+ });
54
+
55
+ // Write back the modified content
56
+ fs.writeFileSync(some_path, content);
57
+ console.log(`Processed file: ${file}`);
58
+ }
59
+ });
60
+ }
61
+
62
+ processDirectory(folderPath)
63
+ }
64
+
65
+ // Example usage
66
+ try {
67
+ shift_logs(`.`, 236, 276); //'./your_folder', 123, 456);
68
+ console.log('Sequence fixing completed');
69
+ } catch (error) {
70
+ console.error('Error:', error.message);
71
+ }
72
+
73
+
74
+ function check_types({ folderPath, startNum, endNum }) {
75
+ }
package/action.yml CHANGED
@@ -33,6 +33,10 @@ inputs:
33
33
  description: "The version of docassemblecli to install."
34
34
  required: false
35
35
  default: "0.0.17"
36
+ MAX_RANDOM_TESTS_PER_SCENARIO:
37
+ description: "The maximum number of tests ALKiln will generate for every Scenario that can generate tests."
38
+ required: false
39
+ # Default will be internal to avoid duplication of data
36
40
 
37
41
  outputs:
38
42
  PATH_TO_ARTIFACTS:
@@ -41,6 +45,9 @@ outputs:
41
45
  PATH_TO_REPORT_FILE:
42
46
  description: 'An empty string ("") or the path to report.txt. Remember to check for the existence of the file before using it.'
43
47
  value: ${{ steps.alkiln_outputs.outputs.PATH_TO_REPORT_FILE }}
48
+ PATH_TO_REPORT_LOG_FILE:
49
+ description: 'An empty string ("") or the path to report_log.txt. Remember to check for the existence of the file before using it.'
50
+ value: ${{ steps.alkiln_outputs.outputs.PATH_TO_REPORT_LOG_FILE }}
44
51
  PATH_TO_UNEXPECTED_RESULTS_FILE:
45
52
  description: 'An empty string ("") or the path to unexpected_results.txt. Remember to check for the existence of the file before using it.'
46
53
  value: ${{ steps.alkiln_outputs.outputs.PATH_TO_UNEXPECTED_RESULTS_FILE }}
@@ -65,11 +72,23 @@ runs:
65
72
  MAX_SECONDS_FOR_SETUP: ${{ inputs.MAX_SECONDS_FOR_SETUP }}
66
73
  SERVER_RELOAD_TIMEOUT_SECONDS: ${{ inputs.SERVER_RELOAD_TIMEOUT_SECONDS }}
67
74
  DOCASSEMBLECLI_VERSION: ${{ inputs.DOCASSEMBLECLI_VERSION }}
75
+ MAX_RANDOM_TESTS_PER_SCENARIO: ${{ inputs.MAX_RANDOM_TESTS_PER_SCENARIO }}
68
76
  shell: bash
69
77
  run: |
70
- # 💡 ALK0023 INFO: Set environment variables
78
+ log="💡 ALK0023 INFO: Set environment variables and create artifacts folder"
79
+
71
80
  # Human-readable date/time: https://www.shell-tips.com/linux/how-to-format-date-and-time-in-linux-macos-and-bash/#how-to-format-a-date-in-bash
72
- echo "ARTIFACT_NAME=alkiln-$(date +'%Y-%m-%d at %Hh%Mm%Ss' -u)UTC" >> $GITHUB_ENV
81
+ timestamp="$(date +'%Y-%m-%d at %Hh%Mm%Ss' -u)"
82
+ artifact_folder="alkiln-${timestamp}UTC"
83
+ debug_path="${artifact_folder}/debug_log.txt"
84
+ mkdir -p "$artifact_folder"
85
+ echo "$log" >> "$debug_path"
86
+
87
+ # Action-specific vars
88
+ echo "ARTIFACT_FOLDER=$artifact_folder" >> $GITHUB_ENV
89
+ echo "DEBUG_PATH=$debug_path" >> $GITHUB_ENV
90
+
91
+ # Required for all tests
73
92
  echo "REPO_URL=${{ github.server_url }}/${{ github.repository }}" >> $GITHUB_ENV
74
93
  echo "BRANCH_PATH=$BRANCH_PATH" >> $GITHUB_ENV
75
94
  # Workflow inputs
@@ -77,6 +96,7 @@ runs:
77
96
  echo "DOCASSEMBLE_DEVELOPER_API_KEY=$DOCASSEMBLE_DEVELOPER_API_KEY" >> $GITHUB_ENV
78
97
  echo "ALKILN_VERSION=$ALKILN_VERSION" >> $GITHUB_ENV
79
98
  echo "MAX_SECONDS_FOR_SETUP=$MAX_SECONDS_FOR_SETUP" >> $GITHUB_ENV
99
+ echo "MAX_RANDOM_TESTS_PER_SCENARIO=$MAX_RANDOM_TESTS_PER_SCENARIO" >> $GITHUB_ENV
80
100
  echo "SERVER_RELOAD_TIMEOUT_SECONDS=$SERVER_RELOAD_TIMEOUT_SECONDS" >> $GITHUB_ENV
81
101
  echo "DOCASSEMBLECLI_VERSION=$DOCASSEMBLECLI_VERSION" >> $GITHUB_ENV
82
102
  # Hard-coded internal ALKiln vars
@@ -84,22 +104,35 @@ runs:
84
104
  - name: "💡 ALK0024 INFO: Confirm environment variables"
85
105
  shell: bash
86
106
  run: |
87
- # 💡 ALK0024 INFO: Confirm environment variables
88
- echo -e "\nALKiln version is $ALKILN_VERSION\nRepo is $REPO_URL\nBranch ref is $BRANCH_PATH\nMAX_SECONDS_FOR_SETUP is $MAX_SECONDS_FOR_SETUP\nSERVER_RELOAD_TIMEOUT_SECONDS is $SERVER_RELOAD_TIMEOUT_SECONDS\n"
107
+ log="💡 ALK0024 INFO: Confirm environment variables"
108
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
109
+ vars_log='\nALKiln version is ${{ env.ALKILN_VERSION }}\nRepo is "${{ env.REPO_URL }}"\nBranch ref is "${{ env.BRANCH_PATH }}"\nCustom MAX_SECONDS_FOR_SETUP is "${{ env.MAX_SECONDS_FOR_SETUP }}"\nCustom SERVER_RELOAD_TIMEOUT_SECONDS is "${{ env.SERVER_RELOAD_TIMEOUT_SECONDS }}"\nCustom MAX_RANDOM_TESTS_PER_SCENARIO is "${{ env.MAX_RANDOM_TESTS_PER_SCENARIO }}"\n'
110
+ echo -e "$vars_log" >> "${{ env.DEBUG_PATH }}" && echo -e "$vars_log"
89
111
 
90
- # Install
91
- - name: "💡 ALK0025 INFO: Install node packages"
112
+ # Install ALKiln during GitHub workflow
113
+ - name: "💡 ALK0025 INFO: Set up node"
92
114
  uses: actions/setup-node@v4
93
115
  with:
94
116
  node-version: "18"
95
117
  - name: "💡 ALK0026 INFO: Install ALKiln directly from npm"
96
118
  shell: bash
97
119
  run: |
98
- # 💡 ALK0026 INFO: Install ALKiln directly from npm
120
+ log="💡 ALK0026 INFO: Install ALKiln directly from npm"
121
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
99
122
  npm install -g "@suffolklitlab/alkiln@$ALKILN_VERSION"
100
123
 
101
- # Install on playground
124
+ # Files prep
125
+ - shell: bash
126
+ env:
127
+ ARTIFACT_FOLDER: ${{ env.ARTIFACT_FOLDER }}
128
+ run: |
129
+ log="💡 ALK0275 INFO: Prepare repository test files"
130
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
131
+ alkiln-artifacts --path="${{ env.ARTIFACT_FOLDER }}"
132
+ alkiln-validate
133
+ alkiln-generate
102
134
 
135
+ # Install package on playground
103
136
  # Don't rely on the environment's version of python
104
137
  - uses: actions/setup-python@v5
105
138
  if: ${{ inputs.INSTALL_METHOD == 'playground' }}
@@ -109,26 +142,32 @@ runs:
109
142
  if: ${{ inputs.INSTALL_METHOD == 'playground' }}
110
143
  shell: bash
111
144
  run: |
112
- # 💡 ALK0027 INFO: Create a Project and install the package from GitHub
145
+ log="💡 ALK0027 INFO: Create a Project and install the package from GitHub"
146
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
113
147
  pip install "docassemblecli==$DOCASSEMBLECLI_VERSION"
114
148
  alkiln-setup
115
- - name: "😞 ALK0028 ERROR: Unable to create a Project"
149
+ - name: "🤕 ALK0028 ERROR: Unable to create a Project"
116
150
  if: ${{ inputs.INSTALL_METHOD == 'playground' && failure() }}
117
151
  shell: bash
118
152
  run: |
119
- # 😞 ALK0028 ERROR: Unable to create a Project
120
- echo -e "\n\n====\n😞 ALK0028 ERROR: Unable to create a Project on your server's testing account or pull your package into it. Check the messages above this line.\n\n"
153
+ # "🤕 ALK0028 ERROR: Unable to create a Project"
154
+ long_log="\n\n―――\n🤕 ALK0028 ERROR: Unable to create a Project on your server's testing account or pull your package into it. Check the messages above this line.\n\n"
155
+ echo -e "$long_log" >> "${{ env.DEBUG_PATH }}" && echo -e "$long_log"
121
156
 
122
- # Server installations - find folders and save session vars
123
- - name: "💡 ALK0029 INFO: Install the GitHub package onto the server"
157
+ # Server installation
158
+ - name: "💡 ALK0029 INFO: Try to install the GitHub package onto the GitHub sandbox server"
124
159
  if: ${{ inputs.INSTALL_METHOD == 'server' }}
125
160
  shell: bash
126
- run: alkiln-server-install
127
- - name: "😞 ALK0030 ERROR: Unable to install the package"
161
+ run: |
162
+ log="💡 ALK0029 INFO: Install the GitHub package onto the server"
163
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
164
+ alkiln-server-install
165
+ - name: "🤕 ALK0030 ERROR: Unable to install the package on the GitHub sandbox server"
128
166
  if: ${{ inputs.INSTALL_METHOD == 'server' && failure() }}
129
167
  shell: bash
130
168
  run: |
131
- echo -e "\n\n====\n😞 ALK0030 ERROR: Unable to install the package on the temporary GitHub docassemble server. Check the steps above this line.\n\n"
169
+ log="\n\n―――\n🤕 ALK0030 ERROR: Unable to install the package on the temporary GitHub docassemble server. Check the steps above this line.\n\n"
170
+ echo -e "$log" >> "${{ env.DEBUG_PATH }}" && echo -e "$log"
132
171
 
133
172
  # run tests
134
173
  - name: "💡 ALK0031 INFO: Run tests"
@@ -136,20 +175,26 @@ runs:
136
175
  env:
137
176
  ALKILN_TAG_EXPRESSION: ${{ inputs.ALKILN_TAG_EXPRESSION || github.event.inputs.tags && format('{0}', github.event.inputs.tags) }}
138
177
  shell: bash
139
- run: alkiln-run "$ALKILN_TAG_EXPRESSION"
178
+ run: |
179
+ log="💡 ALK0031 INFO: Run tests"
180
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
181
+ alkiln-run "$ALKILN_TAG_EXPRESSION"
140
182
 
141
183
  # on playground, delete project
142
184
  - name: "💡 ALK0032 INFO: Delete the Project from the Playground"
143
185
  if: ${{ always() && inputs.INSTALL_METHOD == 'playground' }}
144
- run: alkiln-takedown
145
186
  shell: bash
187
+ run: |
188
+ log="💡 ALK0032 INFO: Delete the Project from the Playground"
189
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
190
+ alkiln-takedown
146
191
 
147
192
  # Upload artifacts that subscribers can download on the Actions summary page
148
193
  - name: "💡 ALK0033 INFO: Upload artifacts folder"
149
194
  if: ${{ always() }}
150
195
  uses: actions/upload-artifact@v4
151
196
  with:
152
- name: ${{ env.ARTIFACT_NAME }}
197
+ name: ${{ env.ARTIFACT_FOLDER }}
153
198
  path: ./alkiln-*
154
199
 
155
200
  # Download artifacts folder internally to create action output
@@ -157,45 +202,56 @@ runs:
157
202
  if: ${{ always() }}
158
203
  uses: actions/download-artifact@v4
159
204
  with:
160
- name: ${{ env.ARTIFACT_NAME }}
205
+ name: ${{ env.ARTIFACT_FOLDER }}
161
206
 
162
207
  - name: "💡 ALK0184 INFO: Prepare ALKiln output file paths"
163
208
  if: ${{ always() }}
164
209
  id: alkiln_outputs
165
210
  shell: bash
166
211
  run: |
167
- # 💡 ALK0184 INFO: Prepare ALKiln output file paths
212
+ log="💡 ALK0184 INFO: Prepare ALKiln output file paths"
213
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo "$log"
168
214
 
169
215
  FOLDER=$(ls -d */ | grep -E '^alkiln-*' || true)
170
216
 
171
- echo "Test results artifacts folder is $FOLDER"
217
+ log_folder="Test results artifacts folder is $FOLDER"
218
+ echo -e "\n$log_folder" >> "${{ env.DEBUG_PATH }}" && echo "$log_folder"
172
219
 
173
220
  if [[ "$FOLDER" = "" ]]; then
174
- echo "Artifacts folder is missing. The path is an empty string: '$FOLDER'"
221
+ log_missing="Artifacts folder is missing. The path is an empty string: '$FOLDER'"
222
+ echo -e "\n$log_missing" >> "${{ env.DEBUG_PATH }}" && echo "$log_missing"
175
223
 
176
224
  else
177
225
  REPORT_PATH="${FOLDER}report.txt"
226
+ REPORT_LOG_PATH="${FOLDER}report_log.txt"
178
227
  UNEXPECTED_RESULTS_PATH="${FOLDER}unexpected_results.txt"
179
228
  DEBUG_LOG_PATH="${FOLDER}debug_log.txt"
180
229
 
181
230
  if [ -f "$REPORT_PATH" ]; then
182
- echo "$REPORT_PATH exists"
231
+ echo -e "\n$REPORT_PATH exists" >> "${{ env.DEBUG_PATH }}" && echo "$REPORT_PATH exists"
183
232
  else
184
- echo "$REPORT_PATH is missing"
233
+ echo -e "\n$REPORT_PATH is missing" >> "${{ env.DEBUG_PATH }}" && echo "$REPORT_PATH is missing"
185
234
  REPORT_PATH=""
186
235
  fi
187
236
 
237
+ if [ -f "$REPORT_LOG_PATH" ]; then
238
+ echo -e "\n$REPORT_LOG_PATH exists" >> "${{ env.DEBUG_PATH }}" && echo "$REPORT_LOG_PATH exists"
239
+ else
240
+ echo -e "\n$REPORT_LOG_PATH is missing" >> "${{ env.DEBUG_PATH }}" && echo "$REPORT_LOG_PATH is missing"
241
+ REPORT_LOG_PATH=""
242
+ fi
243
+
188
244
  if [ -f "$UNEXPECTED_RESULTS_PATH" ]; then
189
- echo "$UNEXPECTED_RESULTS_PATH exists"
245
+ echo -e "\n$UNEXPECTED_RESULTS_PATH exists" >> "${{ env.DEBUG_PATH }}" && echo "$UNEXPECTED_RESULTS_PATH exists"
190
246
  else
191
- echo "$UNEXPECTED_RESULTS_PATH is missing"
247
+ echo -e "\n$UNEXPECTED_RESULTS_PATH is missing" >> "${{ env.DEBUG_PATH }}" && echo "$UNEXPECTED_RESULTS_PATH is missing"
192
248
  UNEXPECTED_RESULTS_PATH=""
193
249
  fi
194
250
 
195
251
  if [ -f "$DEBUG_LOG_PATH" ]; then
196
- echo "$DEBUG_LOG_PATH exists"
252
+ echo -e "\n$DEBUG_LOG_PATH exists" >> "${{ env.DEBUG_PATH }}" && echo "$DEBUG_LOG_PATH exists"
197
253
  else
198
- echo "$DEBUG_LOG_PATH is missing"
254
+ echo -e "\n$DEBUG_LOG_PATH is missing" >> "${{ env.DEBUG_PATH }}" && echo "$DEBUG_LOG_PATH is missing"
199
255
  DEBUG_LOG_PATH=""
200
256
  fi
201
257
 
@@ -203,6 +259,7 @@ runs:
203
259
 
204
260
  echo "PATH_TO_ARTIFACTS=$FOLDER" >> "$GITHUB_OUTPUT"
205
261
  echo "PATH_TO_REPORT_FILE=$REPORT_PATH" >> "$GITHUB_OUTPUT"
262
+ echo "PATH_TO_REPORT_LOG_FILE=$REPORT_LOG_PATH" >> "$GITHUB_OUTPUT"
206
263
  echo "PATH_TO_UNEXPECTED_RESULTS_FILE=$UNEXPECTED_RESULTS_PATH" >> "$GITHUB_OUTPUT"
207
264
  echo "PATH_TO_DEBUG_LOG_FILE=$DEBUG_LOG_PATH" >> "$GITHUB_OUTPUT"
208
265
 
@@ -212,4 +269,5 @@ runs:
212
269
  - shell: bash
213
270
  if: ${{ always() }}
214
271
  run: |
215
- echo "💡 ALK0034 INFO: ALkiln finished running tests"
272
+ log="💡 ALK0034 INFO: ALkiln finished running tests. See above for more details."
273
+ echo -e "\n$log" >> "${{ env.DEBUG_PATH }}" && echo "$log"