@suffolklitlab/alkiln 5.0.2-feat-github-server-12 → 5.0.2-feat-github-server-13

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.
@@ -59,7 +59,7 @@ jobs:
59
59
  if: ${{ failure() }}
60
60
  uses: mxschmitt/action-tmate@v3
61
61
 
62
- - name: Set more env vars
62
+ - name: Env vars from server output
63
63
  run: |
64
64
  echo "USER1_EMAIL=${{ steps.github_server.outputs.DA_ADMIN_EMAIL }}" >> $GITHUB_ENV
65
65
  echo "USER1_PASSWORD=${{ steps.github_server.outputs.DA_ADMIN_PASSWORD }}" >> $GITHUB_ENV
@@ -78,6 +78,6 @@ jobs:
78
78
  DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
79
79
  INSTALL_METHOD: "server"
80
80
  # TODO: See what happens if this is an empty string
81
- ALKILN_VERSION: "5.0.2-feat-github-server-12"
81
+ ALKILN_VERSION: "5.0.2-feat-github-server-13"
82
82
  - run: echo "Finished running ALKiln tests"
83
83
 
@@ -1,7 +1,7 @@
1
1
  name: "ALKiln/github_server: Isolated docassemble tests"
2
2
  description: "Download and start up a temporary docassemble server on GitHub's servers, in an isolated environment. Avoids docassemble reload errors and other external factors."
3
3
 
4
- # Wat? Exit with 52
4
+ # Bug? Race condition? Exit with 52 when waiting for container to finish starting
5
5
  # https://github.com/SuffolkLITLab/ALKiln/actions/runs/5912900256/job/16036751264#step:4:188
6
6
  # Had no completion messages, but it exited with an error anyway
7
7
  # Took 121 seconds
@@ -53,9 +53,6 @@ runs:
53
53
  run: |
54
54
  echo "DA_ADMIN_API_KEY=abcd1234abcd1234abcd5678abdc5678" >> $GITHUB_ENV
55
55
  echo "MAX_SECONDS_FOR_DOCKER=${{ inputs.MAX_SECONDS_FOR_DOCKER }}" >> $GITHUB_ENV
56
- echo "CLONE_URL=${{ github.server_url }}/${{ github.repository }}.git" >> $GITHUB_ENV
57
- echo "OWNER_AND_REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
58
- echo "BRANCH_REF=${{ github.ref }}" >> $GITHUB_ENV
59
56
  echo "DA_ADMIN_EMAIL=admin@example.com" >> $GITHUB_ENV
60
57
  # Login will fail if this is "password"
61
58
  echo "DA_ADMIN_PASSWORD=@123abcdefg" >> $GITHUB_ENV
@@ -76,7 +73,7 @@ runs:
76
73
  shell: bash
77
74
  - name: "ALKiln github_server: Wait for server to start"
78
75
  run: |
79
- # github_server: Wait for server to start
76
+ # ALKiln github_server: Wait for server to start
80
77
 
81
78
  # Reset the SECONDS variable
82
79
  SECONDS=0
@@ -54,22 +54,6 @@ da.create_project = async function ( project_name, timeout ) {
54
54
  }
55
55
  }; // Ends da.create_project()
56
56
 
57
- da.install_on_server = async function ( github_repo, branch_name, timeout ) {
58
- let options = {
59
- method: 'POST',
60
- url: `${ session_vars.get_da_server_url() }/api/package`,
61
- data: qs.stringify( {
62
- key: session_vars.get_dev_api_key(),
63
- github_url: github_repo,
64
- branch: branch_name
65
- }),
66
- timeout: timeout,
67
- };
68
- console.log("%o", options);
69
-
70
- return await axios.request(options);
71
- };
72
-
73
57
 
74
58
  // node -e 'require("./lib/docassemble/docassemble_api_REST.js").pull()'
75
59
  da.pull = async function ( timeout ) {
@@ -329,27 +329,6 @@ da_i.pull = async function ( pull_options ) {
329
329
  }
330
330
  }; // Ends da_i.pull()
331
331
 
332
-
333
- da_i.install_on_server = async function ( install_options ) {
334
- let { timeout } = install_options || { timeout: DEFAULT_MAX_REQUEST_MS };
335
-
336
- try {
337
- let response = await _da_REST.install_on_server(
338
- session_vars.get_repo_url(),
339
- session_vars.get_branch_name(),
340
- timeout
341
- );
342
- if ( response && response.status === 200 ) {
343
- log.debug({ pre: `install task id: ${ response.data.task_id }` });
344
- return response.data.task_id;
345
- }
346
- return null;
347
- } catch (error ) {
348
- log.error({ pre: `Installing on the docassemble serve ran into an unexpected error.`, data: error.toJSON()});
349
- }
350
-
351
- };
352
-
353
332
  // node -e 'require("./lib/docassemble/docassemble_api_interface.js").has_task_finished()'
354
333
  da_i.has_task_finished = async function ( api_endpoint, task_id, options ) {
355
334
  /** Check task status if it exists. If not, return true as task did
@@ -1,18 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- //const da_i = require('./docassemble_api_interface');
4
3
  const session_vars = require('../utils/session_vars');
5
4
 
6
5
  const server_install = async () => {
7
- // let task_id = await da_i.install_on_server();
8
- // if (task_id) {
9
- // console.log("Waiting...")
10
- // await da_i.wait_for_package_to_restart(task_id);
11
- // }
12
- // console.log("Done!")
13
-
14
6
  session_vars.save_install_type("server");
15
-
16
7
  }; // Ends server_install();
17
8
 
18
9
  server_install();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.0.2-feat-github-server-12",
3
+ "version": "5.0.2-feat-github-server-13",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {