@@ -11,16 +11,20 @@ jobs:
11
11
- name : Checkout repository
12
12
uses : actions/checkout@v2
13
13
14
+ - uses : actions/setup-node@v2
15
+ with :
16
+ node-version : 12
17
+
14
18
- name : Run sauce-connect-action
15
19
shell : bash
16
20
env :
17
21
SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
18
22
SAUCE_ACCESS_KEY : ${{ secrets.SAUCE_ACCESS_KEY }}
19
23
TRAVIS_JOB_NUMBER : ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
20
- run : tests/frontend/travis/sauce_tunnel.sh
24
+ run : src/ tests/frontend/travis/sauce_tunnel.sh
21
25
22
26
- name : Install all dependencies and symlink for ep_etherpad-lite
23
- run : bin/installDeps.sh
27
+ run : src/ bin/installDeps.sh
24
28
25
29
- name : export GIT_HASH to env
26
30
id : environment
37
41
TRAVIS_JOB_NUMBER : ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
38
42
GIT_HASH : ${{ steps.environment.outputs.sha_short }}
39
43
run : |
40
- tests/frontend/travis/runner.sh
44
+ src/ tests/frontend/travis/runner.sh
41
45
42
46
withplugins :
43
47
name : with plugins
@@ -47,19 +51,44 @@ jobs:
47
51
- name : Checkout repository
48
52
uses : actions/checkout@v2
49
53
54
+ - uses : actions/setup-node@v2
55
+ with :
56
+ node-version : 12
57
+
50
58
- name : Run sauce-connect-action
51
59
shell : bash
52
60
env :
53
61
SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
54
62
SAUCE_ACCESS_KEY : ${{ secrets.SAUCE_ACCESS_KEY }}
55
63
TRAVIS_JOB_NUMBER : ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
56
- run : tests/frontend/travis/sauce_tunnel.sh
57
-
64
+ run : src/tests/frontend/travis/sauce_tunnel.sh
65
+
66
+ - name : Install Etherpad plugins
67
+ run : >
68
+ npm install
69
+ ep_align
70
+ ep_author_hover
71
+ ep_cursortrace
72
+ ep_font_size
73
+ ep_hash_auth
74
+ ep_headings2
75
+ ep_image_upload
76
+ ep_markdown
77
+ ep_readonly_guest
78
+ ep_set_title_on_pad
79
+ ep_spellcheck
80
+ ep_subscript_and_superscript
81
+ ep_table_of_contents
82
+
83
+ # This must be run after installing the plugins, otherwise npm will try to
84
+ # hoist common dependencies by removing them from src/node_modules and
85
+ # installing them in the top-level node_modules. As of v6.14.10, npm's hoist
86
+ # logic appears to be buggy, because it sometimes removes dependencies from
87
+ # src/node_modules but fails to add them to the top-level node_modules. Even
88
+ # if npm correctly hoists the dependencies, the hoisting seems to confuse
89
+ # tools such as `npm outdated`, `npm update`, and some ESLint rules.
58
90
- name : Install all dependencies and symlink for ep_etherpad-lite
59
- run : bin/installDeps.sh
60
-
61
- - name : Install etherpad plugins
62
- run : npm install ep_align ep_author_hover ep_cursortrace ep_font_size ep_hash_auth ep_headings2 ep_markdown ep_readonly_guest ep_spellcheck ep_subscript_and_superscript ep_table_of_contents ep_set_title_on_pad
91
+ run : src/bin/installDeps.sh
63
92
64
93
- name : export GIT_HASH to env
65
94
id : environment
68
97
- name : Write custom settings.json with loglevel WARN
69
98
run : " sed 's/\" loglevel\" : \" INFO\" ,/\" loglevel\" : \" WARN\" ,/' < settings.json.template > settings.json"
70
99
100
+ - name : Write custom settings.json that enables the Admin UI tests
101
+ run : " sed -i 's/\" enableAdminUITests\" : false/\" enableAdminUITests\" : true,\\ n\" users\" :{\" admin\" :{\" password\" :\" changeme\" ,\" is_admin\" :true}}/' settings.json"
102
+
71
103
# XXX we should probably run all tests, because plugins could effect their results
72
104
- name : Remove standard frontend test files, so only plugin tests are run
73
- run : rm tests/frontend/specs/*
105
+ run : rm src/ tests/frontend/specs/*
74
106
75
107
- name : Run the frontend tests
76
108
shell : bash
80
112
TRAVIS_JOB_NUMBER : ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
81
113
GIT_HASH : ${{ steps.environment.outputs.sha_short }}
82
114
run : |
83
- tests/frontend/travis/runner.sh
115
+ src/ tests/frontend/travis/runner.sh
0 commit comments