@suffolklitlab/alkiln 5.15.4-ref-paths-1 → 5.16.0-fix-artifacts
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.
- package/.github/workflows/da_image_v_sha_7d13853.yml +69 -0
- package/.github/workflows/github_server.yml +32 -5
- package/.github/workflows/playground.yml +7 -5
- package/CHANGELOG.md +27 -2
- package/action.yml +55 -2
- package/action_for_github_server/action.yml +26 -9
- package/docs/016_root_path_2026_04_09.md +1 -1
- package/lib/setup/artifacts.js +6 -1
- package/npm-shrinkwrap.json +7 -3
- package/package.json +1 -1
- package/tests/log_codes/log_code_expected_instances.txt +5 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Use docassemble image version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
show_docker_output:
|
|
9
|
+
required: false
|
|
10
|
+
default: false
|
|
11
|
+
type: boolean
|
|
12
|
+
description: 'Show the docker logs while building the GitHub server container. It will also save the docker log artifact. This might show sensitive config information.'
|
|
13
|
+
# Experimental
|
|
14
|
+
enable_tmate:
|
|
15
|
+
type: boolean
|
|
16
|
+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
|
17
|
+
required: false
|
|
18
|
+
default: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
|
|
22
|
+
github-server-tests:
|
|
23
|
+
# Avoids running double tests when someone on the team makes a pull request
|
|
24
|
+
# 1: Trigger job on push or dispatch from this repository
|
|
25
|
+
# 2: Trigger job on pull request from a fork
|
|
26
|
+
if: (
|
|
27
|
+
github.event_name != 'pull_request'
|
|
28
|
+
&& ! github.event.pull_request.head.repo.fork
|
|
29
|
+
) || (
|
|
30
|
+
github.event_name == 'pull_request'
|
|
31
|
+
&& github.event.pull_request.head.repo.fork
|
|
32
|
+
)
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
strategy:
|
|
35
|
+
matrix:
|
|
36
|
+
node-version: [24.x]
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
# Place the root directory in this branch to access relative paths to
|
|
40
|
+
# action files
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: "ALKiln - Use a specific docassemble image version to start the isolated temporary docassemble server on GitHub"
|
|
44
|
+
id: github_server
|
|
45
|
+
uses: ./action_for_github_server
|
|
46
|
+
with:
|
|
47
|
+
SHOW_DOCKER_OUTPUT: "${{ github.event.inputs.show_docker_output }}"
|
|
48
|
+
DOCASSEMBLE_IMAGE: "ghcr.io/suffolklitlab/docassemble:sha-7d13853"
|
|
49
|
+
- run: echo "ALKiln finished starting the isolated GitHub docassemble server"
|
|
50
|
+
shell: bash
|
|
51
|
+
|
|
52
|
+
## Optional debugging to explore things like docker issues
|
|
53
|
+
#- name: Docker debug tmate session
|
|
54
|
+
# #if: ${{ failure() && github.event.inputs.enable_tmate == 'true' }}
|
|
55
|
+
# uses: mxschmitt/action-tmate@v3
|
|
56
|
+
|
|
57
|
+
- name: "ALKiln - Confirm docassemble packages get installed correctly"
|
|
58
|
+
if: ${{ success() }}
|
|
59
|
+
id: alkiln
|
|
60
|
+
uses: ./
|
|
61
|
+
with:
|
|
62
|
+
# Required inputs. See
|
|
63
|
+
# https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#sandbox-inputs
|
|
64
|
+
SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
|
|
65
|
+
DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
|
|
66
|
+
INSTALL_METHOD: "server"
|
|
67
|
+
_ALKILN_INTERNAL_TESTS: "true"
|
|
68
|
+
ALKILN_TAG_EXPRESSION: "@e3" # One very simple test
|
|
69
|
+
ALKILN_VERSION: "action_outputs"
|
|
@@ -157,10 +157,37 @@ jobs:
|
|
|
157
157
|
SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
|
|
158
158
|
DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
|
|
159
159
|
INSTALL_METHOD: "server"
|
|
160
|
-
#### Developer note: You can probably leave the rest out
|
|
160
|
+
#### Developer note: Optional inputs. You can probably leave the rest out
|
|
161
161
|
#### To learn more, see https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#optional-inputs
|
|
162
162
|
ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
|
|
163
|
-
|
|
163
|
+
_ALKILN_INTERNAL_TESTS: "true"
|
|
164
|
+
ALKILN_VERSION: "action_outputs"
|
|
165
|
+
|
|
166
|
+
#### Developer note: You can leave out this section
|
|
167
|
+
# Test our own action output
|
|
168
|
+
- shell: bash
|
|
169
|
+
if: ${{ always() }}
|
|
170
|
+
env:
|
|
171
|
+
GH_TOKEN: ${{ github.token }}
|
|
172
|
+
PATH_TO_ARTIFACTS: "${{ steps.alkiln.outputs.PATH_TO_ARTIFACTS }}"
|
|
173
|
+
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 }}"
|
|
175
|
+
PATH_TO_UNEXPECTED_RESULTS_FILE: "${{ steps.alkiln.outputs.PATH_TO_UNEXPECTED_RESULTS_FILE }}"
|
|
176
|
+
PATH_TO_DEBUG_LOG_FILE: "${{ steps.alkiln.outputs.PATH_TO_DEBUG_LOG_FILE }}"
|
|
177
|
+
run: |
|
|
178
|
+
echo "PATH_TO_ARTIFACTS: $PATH_TO_ARTIFACTS"
|
|
179
|
+
echo "PATH_TO_REPORT_FILE: $PATH_TO_REPORT_FILE"
|
|
180
|
+
echo "PATH_TO_REPORT_LOG_FILE: $PATH_TO_REPORT_LOG_FILE"
|
|
181
|
+
echo "PATH_TO_UNEXPECTED_RESULTS_FILE: $PATH_TO_UNEXPECTED_RESULTS_FILE"
|
|
182
|
+
echo "PATH_TO_DEBUG_LOG_FILE: $PATH_TO_DEBUG_LOG_FILE"
|
|
183
|
+
|
|
184
|
+
# Test accessing the report file
|
|
185
|
+
if [ -f "${{ env.PATH_TO_REPORT_FILE }}" ]; then
|
|
186
|
+
REPORT_TEXT=$(cat "${{ env.PATH_TO_REPORT_FILE }}")
|
|
187
|
+
echo "The report file exists and we can get its text"
|
|
188
|
+
else
|
|
189
|
+
echo "The report file does not exist. Something other than the interview tests may have failed."
|
|
190
|
+
fi
|
|
164
191
|
|
|
165
192
|
#### Developer note: Example of making an issue when tests fail
|
|
166
193
|
#### that includes the text of the failure output file
|
|
@@ -176,13 +203,13 @@ jobs:
|
|
|
176
203
|
# Make an issue with file contents or 'no file' message as part of the body
|
|
177
204
|
|
|
178
205
|
if [ -f "${{ env.PATH_TO_UNEXPECTED_RESULTS_FILE }}" ]; then
|
|
179
|
-
|
|
206
|
+
UNEXPECTED_RESULTS_TEXT=$(cat "${{ env.PATH_TO_UNEXPECTED_RESULTS_FILE }}")
|
|
180
207
|
else
|
|
181
|
-
|
|
208
|
+
UNEXPECTED_RESULTS_TEXT="unexpected_results.txt does not exist. Something other than the interview tests may have failed."
|
|
182
209
|
fi
|
|
183
210
|
|
|
184
211
|
gh issue create --body "An ALKiln test run failed. See the action at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}.
|
|
185
212
|
|
|
186
213
|
### Results:
|
|
187
214
|
|
|
188
|
-
$
|
|
215
|
+
$UNEXPECTED_RESULTS_TEXT" --repo "$GITHUB_REPOSITORY" --label "testing" --title "ALKiln tests failed"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
name: Playground installation
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
push:
|
|
5
4
|
pull_request:
|
|
6
5
|
workflow_dispatch:
|
|
7
6
|
inputs:
|
|
@@ -9,6 +8,8 @@ on:
|
|
|
9
8
|
required: False
|
|
10
9
|
description: 'Optional. Use a "tag expression" specify which tagged tests to run (https://cucumber.io/docs/cucumber/api/#tag-expressions)'
|
|
11
10
|
default: ''
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: "0 1 * * SUN"
|
|
12
13
|
|
|
13
14
|
jobs:
|
|
14
15
|
|
|
@@ -32,7 +33,7 @@ jobs:
|
|
|
32
33
|
|
|
33
34
|
env:
|
|
34
35
|
#### Developer note: We recommend turning these into environment
|
|
35
|
-
#### variables before using them as inputs later
|
|
36
|
+
#### variables, like we do here, before using them as inputs later
|
|
36
37
|
SERVER_URL: ${{ secrets.SERVER_URL }}
|
|
37
38
|
DOCASSEMBLE_DEVELOPER_API_KEY: ${{ secrets.DOCASSEMBLE_DEVELOPER_API_KEY }}
|
|
38
39
|
|
|
@@ -78,8 +79,9 @@ jobs:
|
|
|
78
79
|
#### You can probably leave this out
|
|
79
80
|
ALKILN_MAX_RANDOM_TESTS_PER_SCENARIO: 10
|
|
80
81
|
# Internal: docassemble changes sometimes break @a11y tests. That is
|
|
81
|
-
# a da problem, not ours. We
|
|
82
|
+
# a da problem, not ours. We must trigger @a11y tests manually when we
|
|
82
83
|
# want to check up on this.
|
|
84
|
+
#### Developer note: Optional inputs. You can probably leave the rest out
|
|
83
85
|
ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
_ALKILN_INTERNAL_TESTS: "true"
|
|
87
|
+
ALKILN_VERSION: "action_outputs"
|
package/CHANGELOG.md
CHANGED
|
@@ -45,13 +45,38 @@ Format:
|
|
|
45
45
|
|
|
46
46
|
## [Unreleased]
|
|
47
47
|
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- Added `_ALKILN_INTERNAL_TESTS` action.yml input to allow us to skip some security flags to install and test our development releases of ALKiln.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- In action.yml, temporarily (we hope) replaced `npm rebuild` with an explicit search for existing puppeteer chrome executables. There is no fallback if all of those are missing. Addresses [#1088](https://github.com/suffolkLITLab/aLKiln/issues/1088). We hope to find a proper fix in the future.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
- Artifacts were being created in the wrong dir when using the main action.yml in GitHub actions. See [#1055](https://github.com/suffolkLITLab/aLKiln/issues/1055). We will have to release a temporary fix in the action to let people run passing tests until the week is up and the fix passes our new security measures.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [5.16.0] - 2026-05-14
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- Adds a new optional parameter to `action_for_github_server/action.yml`, the full name of the docassemble image. It defaults to `jhpyle/docassemble:latest`, what we previously used, but can also be changed to an earlier version (`jhpyle/docassemble:1.9.8`) or a different fork of docassemble (`ghcr.io/suffolklitlab/docassemble:latest`). Note that old docassemble versions may sometimes get removed.
|
|
65
|
+
|
|
48
66
|
### Changed
|
|
49
67
|
|
|
50
|
-
-
|
|
68
|
+
- Changed the default version of docassemblecli to 0.0.25
|
|
69
|
+
- Use `cwd` as the base of file paths. Motivated by ALKiP's upcoming need to change the way it handles its own file paths.
|
|
70
|
+
- Handle curl failures while waiting for docassemble server startup. Wrapped the curl call with set +e / set -e so GitHub Actions does not exit on curl failures. All non-zero curl exit codes are treated as "not ready yet" and retried - this covers transient errors like exit code 56 (connection dropped) and exit code 7 (connection refused) that may come up during startup. Added a comment explaining the permissive approach. Changed response value from "000" to "missing" for clarity in logs. See [#1044](https://github.com/SuffolkLITLab/ALKiln/issues/1044).
|
|
51
71
|
|
|
52
72
|
### Fixed
|
|
53
73
|
|
|
54
74
|
- Print error correctly when missing sources paths
|
|
75
|
+
- Changed the default version of docassemblecli to 0.0.25
|
|
76
|
+
|
|
77
|
+
### Security
|
|
78
|
+
|
|
79
|
+
- Security: Gave our main action's `npm install` call the arguments ` --ignore-scripts --min-release-age=7` to improve security against malicious `pre-install` and `post-install` scripts. See [#1053](https://github.com/SuffolkLITLab/ALKiln/issues/1053).
|
|
55
80
|
|
|
56
81
|
## [5.15.4] - 2025-11-29
|
|
57
82
|
|
|
@@ -1243,4 +1268,4 @@ Note: published on incorrect commit
|
|
|
1243
1268
|
- `example.feature` - an example test to get a project started
|
|
1244
1269
|
- `github/workflows/run_form_tests.yml` - Automated github workflow to run tests when code is pushed and a manual trigger for testing without needing to push
|
|
1245
1270
|
- `.gitignore` - ignores files that are generated by the tests and shouldn't be added to the repo
|
|
1246
|
-
- `package.json` - keep up-to-date version of this test repository and hold scripts that the automated tests run
|
|
1271
|
+
- `package.json` - keep up-to-date version of this test repository and hold scripts that the automated tests run
|
package/action.yml
CHANGED
|
@@ -37,6 +37,11 @@ inputs:
|
|
|
37
37
|
description: "The maximum number of tests ALKiln will generate for every Scenario that can generate tests."
|
|
38
38
|
required: false
|
|
39
39
|
# Default will be internal to avoid duplication of data
|
|
40
|
+
_ALKILN_INTERNAL_TESTS:
|
|
41
|
+
description: "If true, will use different security settings."
|
|
42
|
+
type: boolean
|
|
43
|
+
required: false
|
|
44
|
+
default: false
|
|
40
45
|
|
|
41
46
|
outputs:
|
|
42
47
|
PATH_TO_ARTIFACTS:
|
|
@@ -115,12 +120,60 @@ runs:
|
|
|
115
120
|
with:
|
|
116
121
|
node-version: "24.x"
|
|
117
122
|
package-manager-cache: false
|
|
118
|
-
|
|
123
|
+
|
|
124
|
+
# For regular authors
|
|
125
|
+
- name: "💡 ALK0026 INFO: Install ALKiln directly from npm (at least 7 days old)"
|
|
126
|
+
if: ${{ inputs._ALKILN_INTERNAL_TESTS != true }}
|
|
119
127
|
shell: bash
|
|
120
128
|
run: |
|
|
121
129
|
log="💡 ALK0026 INFO: Install ALKiln directly from npm"
|
|
130
|
+
repo_name="${{ github.event.repository.name }}"
|
|
131
|
+
if [[ $repo_name == *"ALKiln"* ]]; then
|
|
132
|
+
echo "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️ YOU MAY BE MISSING THE _ALKILN_INTERNAL_TESTS FLAG ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
|
|
133
|
+
fi
|
|
122
134
|
echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
|
|
123
|
-
|
|
135
|
+
if [[ $repo_name == *"ALKiln"* ]]; then
|
|
136
|
+
echo "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
|
|
137
|
+
fi
|
|
138
|
+
npm install --ignore-scripts --min-release-age=7 -g "@suffolklitlab/alkiln@$ALKILN_VERSION"
|
|
139
|
+
|
|
140
|
+
# For internal development, allow testing with more recent versions of ALKiln
|
|
141
|
+
- name: "🔎 ALK0279 WARNING: Install recent version of ALKiln directly from npm"
|
|
142
|
+
if: ${{ inputs._ALKILN_INTERNAL_TESTS == true }}
|
|
143
|
+
shell: bash
|
|
144
|
+
run: |
|
|
145
|
+
log="🔎 ALK0279 WARNING: Install **recent** version of ALKiln directly from npm"
|
|
146
|
+
repo_name="${{ github.event.repository.name }}"
|
|
147
|
+
if [[ $repo_name != *"ALKiln"* ]]; then
|
|
148
|
+
echo "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️ YOU MAY BE USING AN UNSAFE VERSION OF ALKILN ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
|
|
149
|
+
fi
|
|
150
|
+
echo -e "\n$log" >> "${{ env.DEBUG_PATH }}"
|
|
151
|
+
if [[ $repo_name != *"ALKiln"* ]]; then
|
|
152
|
+
echo "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
|
|
153
|
+
fi
|
|
154
|
+
npm install --ignore-scripts -g "@suffolklitlab/alkiln@$ALKILN_VERSION"
|
|
155
|
+
|
|
156
|
+
# Install puppeteer browser that we skipped with security feature --ignore-scripts
|
|
157
|
+
- name: "💡 ALK0280 INFO: Install puppeteer browser that we skipped with security feature --ignore-scripts"
|
|
158
|
+
if: ${{ inputs._ALKILN_INTERNAL_TESTS == true }}
|
|
159
|
+
shell: bash
|
|
160
|
+
run: |
|
|
161
|
+
BROWSER="$(
|
|
162
|
+
command -v google-chrome-stable ||
|
|
163
|
+
command -v google-chrome ||
|
|
164
|
+
command -v chrome ||
|
|
165
|
+
command -v chromium-browser ||
|
|
166
|
+
command -v chromium ||
|
|
167
|
+
true
|
|
168
|
+
)"
|
|
169
|
+
if [[ -n "$BROWSER" ]]; then
|
|
170
|
+
echo "💡 ALK0280 INFO: Found puppeteer browser executable at '$BROWSER'"
|
|
171
|
+
echo "PUPPETEER_EXECUTABLE_PATH=$BROWSER" >> "$GITHUB_ENV"
|
|
172
|
+
else
|
|
173
|
+
echo "🤕 ALK0281 INFO: Unable to find puppeteer browser executable"
|
|
174
|
+
# Our project uses bash error codes in the 50's. This may change.
|
|
175
|
+
exit 51
|
|
176
|
+
fi
|
|
124
177
|
|
|
125
178
|
# Files prep
|
|
126
179
|
- shell: bash
|
|
@@ -23,10 +23,14 @@ inputs:
|
|
|
23
23
|
description: "Default is 600 seconds. Maximum amount of seconds to give the docassemble docker container to serve the site."
|
|
24
24
|
required: false
|
|
25
25
|
default: 600 # 10 min
|
|
26
|
+
DOCASSEMBLE_IMAGE:
|
|
27
|
+
description: "The specific docassemble image to use."
|
|
28
|
+
required: false
|
|
29
|
+
default: jhpyle/docassemble
|
|
26
30
|
DOCASSEMBLECLI_VERSION:
|
|
27
31
|
description: "The version of docassemblecli to install."
|
|
28
32
|
required: false
|
|
29
|
-
default: "0.0.
|
|
33
|
+
default: "0.0.25"
|
|
30
34
|
|
|
31
35
|
outputs:
|
|
32
36
|
DOCASSEMBLE_DEVELOPER_API_KEY:
|
|
@@ -155,35 +159,37 @@ runs:
|
|
|
155
159
|
if: ${{ env.OUTPUT_DOCKER == 'false' }}
|
|
156
160
|
env:
|
|
157
161
|
CONFIG_ARGS: ${{ env.CONFIG_ARGS }}
|
|
162
|
+
DOCASSEMBLE_IMAGE: "${{ inputs.DOCASSEMBLE_IMAGE }}"
|
|
158
163
|
shell: bash
|
|
159
164
|
run: |
|
|
160
165
|
log="💡 ALK0009 INFO: Download and start docker silently"
|
|
161
166
|
echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
|
|
162
|
-
docker pull
|
|
167
|
+
docker pull "$DOCASSEMBLE_IMAGE" > /dev/null 2>&1
|
|
163
168
|
docker run --name docassemble_container \
|
|
164
169
|
--env DA_ADMIN_EMAIL="$DA_ADMIN_EMAIL" \
|
|
165
170
|
--env DA_ADMIN_PASSWORD="$DA_ADMIN_PASSWORD" \
|
|
166
171
|
--env DA_ADMIN_API_KEY="$DA_ADMIN_API_KEY" \
|
|
167
172
|
$CONFIG_ARGS \
|
|
168
173
|
--cap-add SYS_PTRACE \
|
|
169
|
-
--memory="4gb" -d -p 80:80
|
|
174
|
+
--memory="4gb" -d -p 80:80 "$DOCASSEMBLE_IMAGE" > /dev/null 2>&1
|
|
170
175
|
# With output
|
|
171
176
|
- name: "💡 ALK0010 INFO: Download and start docker"
|
|
172
177
|
if: ${{ env.OUTPUT_DOCKER == 'true' }}
|
|
173
178
|
env:
|
|
174
179
|
CONFIG_ARGS: ${{ env.CONFIG_ARGS }}
|
|
180
|
+
DOCASSEMBLE_IMAGE: "${{ inputs.DOCASSEMBLE_IMAGE }}"
|
|
175
181
|
shell: bash
|
|
176
182
|
run: |
|
|
177
183
|
log="💡 ALK0010 INFO: Download and start docker"
|
|
178
184
|
echo -e "\n$log" >> "${{ env.DEBUG_LOGS_PATH }}"
|
|
179
|
-
docker pull
|
|
185
|
+
docker pull "$DOCASSEMBLE_IMAGE"
|
|
180
186
|
docker run --name docassemble_container \
|
|
181
187
|
--env DA_ADMIN_EMAIL="$DA_ADMIN_EMAIL" \
|
|
182
188
|
--env DA_ADMIN_PASSWORD="$DA_ADMIN_PASSWORD" \
|
|
183
189
|
--env DA_ADMIN_API_KEY="$DA_ADMIN_API_KEY" \
|
|
184
190
|
$CONFIG_ARGS \
|
|
185
191
|
--cap-add SYS_PTRACE \
|
|
186
|
-
--memory="4gb" -d -p 80:80
|
|
192
|
+
--memory="4gb" -d -p 80:80 "$DOCASSEMBLE_IMAGE"
|
|
187
193
|
|
|
188
194
|
# Section for showing the time it takes to start the server.
|
|
189
195
|
|
|
@@ -213,14 +219,25 @@ runs:
|
|
|
213
219
|
|
|
214
220
|
# Check if max seconds till loading has passed
|
|
215
221
|
if [[ $SECONDS -ge $MAX_SECONDS_FOR_DOCKER ]]; then
|
|
216
|
-
log3="🤕 ALK0014 ERROR: Timed out waiting for docker container to serve the site. If you want to give your docker container more
|
|
222
|
+
log3="🤕 ALK0014 ERROR: Timed out waiting for docker container to serve the site. If you want to give your docker container more time to install, set the MAX_SECONDS_FOR_DOCKER input for this action."
|
|
217
223
|
echo -e "\n$log3" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log3"
|
|
218
224
|
exit 1
|
|
219
225
|
fi
|
|
220
226
|
|
|
221
227
|
# Set the variable to a new string value in each iteration
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
# We intentionally skip all non-zero curl exit codes here instead of handling specific ones.
|
|
229
|
+
# During server startup there are several transient errors that can come up and since we already log the exit code and have a timeout,
|
|
230
|
+
# retrying on all of them is safer than trying to maintain a list of specific codes to handle.
|
|
231
|
+
set +e
|
|
232
|
+
response=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:80/health_check?ready=1)
|
|
233
|
+
status=$?
|
|
234
|
+
set -e
|
|
235
|
+
|
|
236
|
+
if [[ $status -ne 0 ]]; then
|
|
237
|
+
response="missing"
|
|
238
|
+
fi
|
|
239
|
+
|
|
240
|
+
log4="💡 ALK0015 INFO: Response is $response (curl exit code: $status)"
|
|
224
241
|
echo -e "\n$log4" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log4"
|
|
225
242
|
|
|
226
243
|
# Check if the string includes the desired text
|
|
@@ -228,7 +245,7 @@ runs:
|
|
|
228
245
|
log5="💡 ALK0016 SUCCESS: Success! The docker container is ready!"
|
|
229
246
|
echo -e "\n$log5" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log5"
|
|
230
247
|
else
|
|
231
|
-
log6="💡 ALK0017 INFO: The docker container is not ready yet. Will check again in 30 seconds."
|
|
248
|
+
log6="💡 ALK0017 INFO: The docker container is not ready yet (HTTP=$response, curl exit code=$status). Will check again in 30 seconds."
|
|
232
249
|
echo -e "\n$log6" >> "${{ env.DEBUG_LOGS_PATH }}" && echo -e "$log6"
|
|
233
250
|
sleep 30
|
|
234
251
|
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Root path
|
|
2
2
|
|
|
3
|
-
This code assumes the current
|
|
3
|
+
This code assumes the current working directory (cwd) will contain the necessary files and folders to get files like `.feature` files and the test run runtime config file.
|
|
4
4
|
|
|
5
5
|
When you run ALKiln on the command line, run the tests in the root directory of the docassemble package with the tests. There are other ways to tell processes where the root directory is. For example, ALKiP, a docassemble package that uses ALKiln inside an author's server, runs `subprocess.run()` or `subprocess.Popen()` with `cwd=`. In ALKiP the `cwd` is most likely `/tmp`.
|
|
6
6
|
|
package/lib/setup/artifacts.js
CHANGED
|
@@ -11,7 +11,12 @@ const Log = require(`../utils/Log.js`);
|
|
|
11
11
|
|
|
12
12
|
session_vars.delete_artifacts_path_name();
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// process.argv is a list of strings of commands and args.
|
|
15
|
+
// If using `npm run artifacts` (as opposed to the bin commands),
|
|
16
|
+
// use `--` before, for example, `--sources=./foo`
|
|
17
|
+
// Envs like action.yml reuse their own .path when return vals are hard to get
|
|
18
|
+
const forced_path = require(`minimist`)( process.argv.slice(2) )?.path;
|
|
19
|
+
const artifacts_path = files.make_artifacts_folder( forced_path );
|
|
15
20
|
session_vars.save_artifacts_path_name( artifacts_path );
|
|
16
21
|
|
|
17
22
|
const log = new Log({ path: artifacts_path, context: `artifacts` });
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suffolklitlab/alkiln",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.1-update-deps2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@suffolklitlab/alkiln",
|
|
9
|
-
"version": "5.15.
|
|
9
|
+
"version": "5.15.1-update-deps2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@axe-core/puppeteer": "4.7.3",
|
|
@@ -380,6 +380,7 @@
|
|
|
380
380
|
"version": "4.0.1",
|
|
381
381
|
"resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-4.0.1.tgz",
|
|
382
382
|
"integrity": "sha512-Kxap9uP5jD8tHUZVjTWgzxemi/0uOsbGjd4LBOSxcJoOCRbESFwemUzilJuzNTB8pcTQUh8D5oudUyxfkJOKmA==",
|
|
383
|
+
"peer": true,
|
|
383
384
|
"peerDependencies": {
|
|
384
385
|
"@cucumber/messages": ">=17.1.1"
|
|
385
386
|
}
|
|
@@ -388,6 +389,7 @@
|
|
|
388
389
|
"version": "19.1.4",
|
|
389
390
|
"resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-19.1.4.tgz",
|
|
390
391
|
"integrity": "sha512-Pksl0pnDz2l1+L5Ug85NlG6LWrrklN9qkMxN5Mv+1XZ3T6u580dnE6mVaxjJRdcOq4tR17Pc0RqIDZMyVY1FlA==",
|
|
392
|
+
"peer": true,
|
|
391
393
|
"dependencies": {
|
|
392
394
|
"@types/uuid": "8.3.4",
|
|
393
395
|
"class-transformer": "0.5.1",
|
|
@@ -1482,7 +1484,8 @@
|
|
|
1482
1484
|
"node_modules/devtools-protocol": {
|
|
1483
1485
|
"version": "0.0.1312386",
|
|
1484
1486
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz",
|
|
1485
|
-
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA=="
|
|
1487
|
+
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==",
|
|
1488
|
+
"peer": true
|
|
1486
1489
|
},
|
|
1487
1490
|
"node_modules/diff": {
|
|
1488
1491
|
"version": "5.0.0",
|
|
@@ -3008,6 +3011,7 @@
|
|
|
3008
3011
|
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.15.0.tgz",
|
|
3009
3012
|
"integrity": "sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q==",
|
|
3010
3013
|
"hasInstallScript": true,
|
|
3014
|
+
"peer": true,
|
|
3011
3015
|
"dependencies": {
|
|
3012
3016
|
"@puppeteer/browsers": "2.3.0",
|
|
3013
3017
|
"cosmiconfig": "^9.0.0",
|
package/package.json
CHANGED