@suffolklitlab/alkiln 5.0.2-feat-github-server-5 → 5.0.2-feat-github-server-7
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/github_server.yml +1 -1
- package/CONTRIBUTING.md +1 -1
- package/action.yml +26 -26
- package/docassemble/setup.py +61 -0
- package/github_server/action.yml +2 -2
- package/lib/scope.js +1 -2
- package/package.json +1 -1
- package/setup.py +2 -2
- package/tmp.bash +0 -7
|
@@ -56,6 +56,6 @@ jobs:
|
|
|
56
56
|
SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
|
|
57
57
|
DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
|
|
58
58
|
INSTALL_METHOD: "server"
|
|
59
|
-
ALKILN_VERSION: "5.0.2-feat-github-server-
|
|
59
|
+
ALKILN_VERSION: "5.0.2-feat-github-server-7"
|
|
60
60
|
- run: echo "Finished running ALKiln tests"
|
|
61
61
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -194,7 +194,7 @@ Our `./action.yml` is a [composite action](https://docs.github.com/en/actions/cr
|
|
|
194
194
|
|
|
195
195
|
### Internal tests
|
|
196
196
|
|
|
197
|
-
We have our own docassemble package in our repo to test our own end-to-end tests. Most of what the package needs is in `./docassemble`. That docassemble package is what the test setup pulls into the docassemble server. Our internal end-to-end cucumber tests are `.feature` files that are stored in `./docassemble/
|
|
197
|
+
We have our own docassemble package in our repo to test our own end-to-end tests. Most of what the package needs is in `./docassemble`. That docassemble package is what the test setup pulls into the docassemble server. Our internal end-to-end cucumber tests are `.feature` files that are stored in `./docassemble/ALKiln/data/sources`. The interview (online form) `.yml` files that those `.feature` files use are also deep in the `./docassemble` package. You probably won't be touching the interview files. If you get curious, feel free to ask us.
|
|
198
198
|
|
|
199
199
|
There are other files the docassemble package needs, like `./setup.py`, so if you see them around, don't worry about them.
|
|
200
200
|
|
package/action.yml
CHANGED
|
@@ -81,33 +81,33 @@ runs:
|
|
|
81
81
|
if: ${{ inputs.INSTALL_METHOD == 'server' && failure() }}
|
|
82
82
|
shell: bash
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
# debugging
|
|
85
|
+
- name: Setup tmate session
|
|
86
|
+
uses: mxschmitt/action-tmate@v3
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
88
|
+
############
|
|
89
|
+
##### !!! WARNING: RESTORE CODE FOR TAGS
|
|
90
|
+
############
|
|
91
|
+
## run tests
|
|
92
|
+
#- name: "ALKiln: Run tests"
|
|
93
|
+
# if: ${{ success() }}
|
|
94
|
+
# run: alkiln-run @e6 or @al1
|
|
95
|
+
# #run: alkiln-run ${{ github.event.inputs.tags && format('{0}', github.event.inputs.tags) }}
|
|
96
|
+
# shell: bash
|
|
97
|
+
#
|
|
98
|
+
## on playground, delete project
|
|
99
|
+
#- name: "ALKiln: Try to delete the project from the playground of the docassemble test account."
|
|
100
|
+
# if: ${{ inputs.INSTALL_METHOD == 'playground' }}
|
|
101
|
+
# run: alkiln-takedown
|
|
102
|
+
# shell: bash
|
|
103
|
+
#
|
|
104
|
+
## Upload artifacts that subscribers can download on the Actions summary page
|
|
105
|
+
#- name: "ALKiln: Upload artifacts folder"
|
|
106
|
+
# if: ${{ always() }}
|
|
107
|
+
# uses: actions/upload-artifact@v3
|
|
108
|
+
# with:
|
|
109
|
+
# name: ${{ env.ARTIFACT_NAME }}
|
|
110
|
+
# path: ./alkiln-*
|
|
111
111
|
|
|
112
112
|
# ##################################
|
|
113
113
|
# # A developer's workflow should look similar to the below
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
from setuptools import setup, find_packages
|
|
4
|
+
from fnmatch import fnmatchcase
|
|
5
|
+
from distutils.util import convert_path
|
|
6
|
+
|
|
7
|
+
standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*')
|
|
8
|
+
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info')
|
|
9
|
+
|
|
10
|
+
def find_package_data(where='.', package='', exclude=standard_exclude, exclude_directories=standard_exclude_directories):
|
|
11
|
+
out = {}
|
|
12
|
+
stack = [(convert_path(where), '', package)]
|
|
13
|
+
while stack:
|
|
14
|
+
where, prefix, package = stack.pop(0)
|
|
15
|
+
for name in os.listdir(where):
|
|
16
|
+
fn = os.path.join(where, name)
|
|
17
|
+
if os.path.isdir(fn):
|
|
18
|
+
bad_name = False
|
|
19
|
+
for pattern in exclude_directories:
|
|
20
|
+
if (fnmatchcase(name, pattern)
|
|
21
|
+
or fn.lower() == pattern.lower()):
|
|
22
|
+
bad_name = True
|
|
23
|
+
break
|
|
24
|
+
if bad_name:
|
|
25
|
+
continue
|
|
26
|
+
if os.path.isfile(os.path.join(fn, '__init__.py')):
|
|
27
|
+
if not package:
|
|
28
|
+
new_package = name
|
|
29
|
+
else:
|
|
30
|
+
new_package = package + '.' + name
|
|
31
|
+
stack.append((fn, '', new_package))
|
|
32
|
+
else:
|
|
33
|
+
stack.append((fn, prefix + name + '/', package))
|
|
34
|
+
else:
|
|
35
|
+
bad_name = False
|
|
36
|
+
for pattern in exclude:
|
|
37
|
+
if (fnmatchcase(name, pattern)
|
|
38
|
+
or fn.lower() == pattern.lower()):
|
|
39
|
+
bad_name = True
|
|
40
|
+
break
|
|
41
|
+
if bad_name:
|
|
42
|
+
continue
|
|
43
|
+
out.setdefault(package, []).append(prefix+name)
|
|
44
|
+
return out
|
|
45
|
+
|
|
46
|
+
setup(name='docassemble.ALKiln',
|
|
47
|
+
version='0.0.1',
|
|
48
|
+
description=('A docassemble extension.'),
|
|
49
|
+
long_description='# docassemble.ALKiln\r\n\r\nA docassemble extension.\r\n\r\nALKiln, or Assembly Line Kiln, is an open source project that helps [docassemble](https://docassemble.org/) developers create automated tests for their interviews (online forms). It works well with the [Document Assembly Line Project](https://suffolklitlab.org/docassemble-AssemblyLine-documentation) but is independent of it.\r\n\r\n',
|
|
50
|
+
long_description_content_type='text/markdown',
|
|
51
|
+
author='plocket',
|
|
52
|
+
author_email='52798256+plocket@users.noreply.github.com',
|
|
53
|
+
license='The MIT License (MIT)',
|
|
54
|
+
url='https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/alkiln',
|
|
55
|
+
packages=find_packages(),
|
|
56
|
+
namespace_packages=['docassemble'],
|
|
57
|
+
install_requires=[],
|
|
58
|
+
zip_safe=False,
|
|
59
|
+
package_data=find_package_data(where='docassemble/ALKiln/', package='docassemble.ALKiln'),
|
|
60
|
+
)
|
|
61
|
+
|
package/github_server/action.yml
CHANGED
|
@@ -43,9 +43,9 @@ runs:
|
|
|
43
43
|
# github_server: Wait for server to start
|
|
44
44
|
|
|
45
45
|
# Reset the SECONDS variable
|
|
46
|
-
SECONDS=
|
|
46
|
+
SECONDS=0
|
|
47
47
|
# Wait 1 minute before pinging the server constantly
|
|
48
|
-
sleep
|
|
48
|
+
sleep 60
|
|
49
49
|
|
|
50
50
|
# Use a variable we can control to avoid race conditions from
|
|
51
51
|
# preventing the success log message.
|
package/lib/scope.js
CHANGED
|
@@ -755,9 +755,8 @@ module.exports = {
|
|
|
755
755
|
if ( session_vars.get_debug() ) { console.log( `interview_url:`, interview_url ); }
|
|
756
756
|
|
|
757
757
|
if ( !scope.page ) { scope.page = await scope.browser.newPage(); }
|
|
758
|
-
|
|
758
|
+
|
|
759
759
|
console.log(`interview_url:`, interview_url);
|
|
760
|
-
interview_url = `http://localhost/interview?new_session=1&i=docassemble.ALKilnTests%3Adata/questions/AL_tests.yml`
|
|
761
760
|
|
|
762
761
|
// TODO: implement and use scope.handle_possible_timeout()
|
|
763
762
|
try {
|
package/package.json
CHANGED
package/setup.py
CHANGED
|
@@ -42,7 +42,7 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d
|
|
|
42
42
|
out.setdefault(package, []).append(prefix+name)
|
|
43
43
|
return out
|
|
44
44
|
|
|
45
|
-
setup(name='docassemble.
|
|
45
|
+
setup(name='docassemble.ALKiln',
|
|
46
46
|
version='1.0.0',
|
|
47
47
|
description=('A docassemble extension for testing the ALKiln integrated testing framework.'),
|
|
48
48
|
long_description='# ALKiln support package\r\n\r\nAssembly Line Kiln (ALKiln) is a framework for automatically testing **any** [docassemble](https://docassemble.org/) package using GitHub. ALKiln is being developed as part of the SuffolkLITLab Document Assembly Line project. See [documentation for kiln](https://suffolklitlab.github.io/docassemble-AssemblyLine-documentation/docs/automated_integrated_testing).\r\n\r\nThis package supports ALKiln in different ways.\r\n\r\n## Tool to set up testing\r\n\r\n[Tap here to set up automated integrated testing for your docassemble interview](https://apps-dev.suffolklitlab.org/start/test-setup/).\r\n\r\nThis repo contains a step-by-step form that a developer can use to set up automated integrated testing for **any** docassemble package. It requires, among other things, a docassemble account and a temporary GitHub personal access token with correct permissions. It will add necessary GitHub secrets, make a new branch, push necessary files to that branch, and make a PR with that branch.\r\n\r\n',
|
|
@@ -55,6 +55,6 @@ setup(name='docassemble.ALKilnTests',
|
|
|
55
55
|
namespace_packages=['docassemble'],
|
|
56
56
|
install_requires=['docassemble.ALToolbox>=0.5.1'],
|
|
57
57
|
zip_safe=False,
|
|
58
|
-
package_data=find_package_data(where='docassemble/
|
|
58
|
+
package_data=find_package_data(where='docassemble/ALKiln/', package='docassemble.ALKiln'),
|
|
59
59
|
)
|
|
60
60
|
|