Skip to content

Commit 113df1f

Browse files
committed
Merge branch 'develop'
2 parents 01a763e + c0f73e6 commit 113df1f

File tree

310 files changed

+11257
-21493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+11257
-21493
lines changed

.github/workflows/backend-tests.yml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v2
1919

20+
- uses: actions/setup-node@v2
21+
with:
22+
node-version: 12
23+
2024
- name: Install libreoffice
2125
run: |
2226
sudo add-apt-repository -y ppa:libreoffice/ppa
2327
sudo apt update
2428
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
2529
2630
- name: Install all dependencies and symlink for ep_etherpad-lite
27-
run: bin/installDeps.sh
31+
run: src/bin/installDeps.sh
2832

2933
# configures some settings and runs npm run test
3034
- name: Run the backend tests
31-
run: tests/frontend/travis/runnerBackend.sh
35+
run: src/tests/frontend/travis/runnerBackend.sh
3236

3337
withplugins:
3438
# run on pushes to any branch
@@ -43,18 +47,43 @@ jobs:
4347
- name: Checkout repository
4448
uses: actions/checkout@v2
4549

50+
- uses: actions/setup-node@v2
51+
with:
52+
node-version: 12
53+
4654
- name: Install libreoffice
4755
run: |
4856
sudo add-apt-repository -y ppa:libreoffice/ppa
4957
sudo apt update
5058
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
5159
52-
- name: Install all dependencies and symlink for ep_etherpad-lite
53-
run: bin/installDeps.sh
60+
- name: Install Etherpad plugins
61+
run: >
62+
npm install
63+
ep_align
64+
ep_author_hover
65+
ep_cursortrace
66+
ep_font_size
67+
ep_hash_auth
68+
ep_headings2
69+
ep_image_upload
70+
ep_markdown
71+
ep_readonly_guest
72+
ep_set_title_on_pad
73+
ep_spellcheck
74+
ep_subscript_and_superscript
75+
ep_table_of_contents
5476
55-
- name: Install etherpad plugins
56-
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
77+
# This must be run after installing the plugins, otherwise npm will try to
78+
# hoist common dependencies by removing them from src/node_modules and
79+
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
80+
# logic appears to be buggy, because it sometimes removes dependencies from
81+
# src/node_modules but fails to add them to the top-level node_modules. Even
82+
# if npm correctly hoists the dependencies, the hoisting seems to confuse
83+
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
84+
- name: Install all dependencies and symlink for ep_etherpad-lite
85+
run: src/bin/installDeps.sh
5786

5887
# configures some settings and runs npm run test
5988
- name: Run the backend tests
60-
run: tests/frontend/travis/runnerBackend.sh
89+
run: src/tests/frontend/travis/runnerBackend.sh

.github/workflows/dockerfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
run: |
2222
docker build -t etherpad:test .
2323
docker run -d -p 9001:9001 etherpad:test
24-
./bin/installDeps.sh
24+
./src/bin/installDeps.sh
2525
sleep 3 # delay for startup?
2626
cd src && npm run test-container
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Frontend admin tests"
2+
3+
on: [push]
4+
5+
jobs:
6+
withplugins:
7+
name: with plugins
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 12
17+
18+
- name: Run sauce-connect-action
19+
shell: bash
20+
env:
21+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
22+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
23+
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
24+
run: src/tests/frontend/travis/sauce_tunnel.sh
25+
26+
- name: Install all dependencies and symlink for ep_etherpad-lite
27+
run: src/bin/installDeps.sh
28+
29+
# We intentionally install a much old ep_align version to test update minor versions
30+
- name: Install etherpad plugins
31+
run: npm install [email protected]
32+
33+
# Nuke plugin tests
34+
- name: Install etherpad plugins
35+
run: rm -Rf node_modules/ep_align/static/tests/*
36+
37+
- name: export GIT_HASH to env
38+
id: environment
39+
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
40+
41+
- name: Write custom settings.json with loglevel WARN
42+
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
43+
44+
- name: Write custom settings.json that enables the Admin UI tests
45+
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"
46+
47+
- name: Remove standard frontend test files, so only admin tests are run
48+
run: mv src/tests/frontend/specs/* /tmp && mv /tmp/admin*.js src/tests/frontend/specs
49+
50+
- name: Run the frontend admin tests
51+
shell: bash
52+
env:
53+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
54+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
55+
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
56+
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
57+
run: |
58+
src/tests/frontend/travis/adminrunner.sh

.github/workflows/frontend-tests.yml

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,20 @@ jobs:
1111
- name: Checkout repository
1212
uses: actions/checkout@v2
1313

14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 12
17+
1418
- name: Run sauce-connect-action
1519
shell: bash
1620
env:
1721
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
1822
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
1923
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
2125

2226
- name: Install all dependencies and symlink for ep_etherpad-lite
23-
run: bin/installDeps.sh
27+
run: src/bin/installDeps.sh
2428

2529
- name: export GIT_HASH to env
2630
id: environment
@@ -37,7 +41,7 @@ jobs:
3741
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
3842
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
3943
run: |
40-
tests/frontend/travis/runner.sh
44+
src/tests/frontend/travis/runner.sh
4145
4246
withplugins:
4347
name: with plugins
@@ -47,19 +51,44 @@ jobs:
4751
- name: Checkout repository
4852
uses: actions/checkout@v2
4953

54+
- uses: actions/setup-node@v2
55+
with:
56+
node-version: 12
57+
5058
- name: Run sauce-connect-action
5159
shell: bash
5260
env:
5361
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
5462
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
5563
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.
5890
- 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
6392

6493
- name: export GIT_HASH to env
6594
id: environment
@@ -68,9 +97,12 @@ jobs:
6897
- name: Write custom settings.json with loglevel WARN
6998
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
7099

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+
71103
# XXX we should probably run all tests, because plugins could effect their results
72104
- 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/*
74106

75107
- name: Run the frontend tests
76108
shell: bash
@@ -80,4 +112,4 @@ jobs:
80112
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
81113
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
82114
run: |
83-
tests/frontend/travis/runner.sh
115+
src/tests/frontend/travis/runner.sh

.github/workflows/lint-package-lock.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v2
1919

20+
- uses: actions/setup-node@v2
21+
with:
22+
node-version: 12
23+
2024
- name: Install lockfile-lint
2125
run: npm install lockfile-lint
2226

.github/workflows/load-test.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v2
1919

20+
- uses: actions/setup-node@v2
21+
with:
22+
node-version: 12
23+
2024
- name: Install all dependencies and symlink for ep_etherpad-lite
21-
run: bin/installDeps.sh
25+
run: src/bin/installDeps.sh
2226

2327
- name: Install etherpad-load-test
2428
run: sudo npm install -g etherpad-load-test
2529

2630
- name: Run load test
27-
run: tests/frontend/travis/runnerLoadTest.sh
31+
run: src/tests/frontend/travis/runnerLoadTest.sh
2832

2933
withplugins:
3034
# run on pushes to any branch
@@ -39,15 +43,39 @@ jobs:
3943
- name: Checkout repository
4044
uses: actions/checkout@v2
4145

42-
- name: Install all dependencies and symlink for ep_etherpad-lite
43-
run: bin/installDeps.sh
46+
- uses: actions/setup-node@v2
47+
with:
48+
node-version: 12
4449

4550
- name: Install etherpad-load-test
4651
run: sudo npm install -g etherpad-load-test
4752

4853
- name: Install etherpad plugins
49-
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
54+
run: >
55+
npm install
56+
ep_align
57+
ep_author_hover
58+
ep_cursortrace
59+
ep_font_size
60+
ep_hash_auth
61+
ep_headings2
62+
ep_markdown
63+
ep_readonly_guest
64+
ep_set_title_on_pad
65+
ep_spellcheck
66+
ep_subscript_and_superscript
67+
ep_table_of_contents
68+
69+
# This must be run after installing the plugins, otherwise npm will try to
70+
# hoist common dependencies by removing them from src/node_modules and
71+
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
72+
# logic appears to be buggy, because it sometimes removes dependencies from
73+
# src/node_modules but fails to add them to the top-level node_modules. Even
74+
# if npm correctly hoists the dependencies, the hoisting seems to confuse
75+
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
76+
- name: Install all dependencies and symlink for ep_etherpad-lite
77+
run: src/bin/installDeps.sh
5078

5179
# configures some settings and runs npm run test
5280
- name: Run load test
53-
run: tests/frontend/travis/runnerLoadTest.sh
81+
run: src/tests/frontend/travis/runnerLoadTest.sh

.github/workflows/rate-limit.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,28 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v2
1818

19+
- uses: actions/setup-node@v2
20+
with:
21+
node-version: 12
22+
1923
- name: docker network
2024
run: docker network create --subnet=172.23.42.0/16 ep_net
2125

2226
- name: build docker image
2327
run: |
2428
docker build -f Dockerfile -t epl-debian-slim .
25-
docker build -f tests/ratelimit/Dockerfile.nginx -t nginx-latest .
26-
docker build -f tests/ratelimit/Dockerfile.anotherip -t anotherip .
29+
docker build -f src/tests/ratelimit/Dockerfile.nginx -t nginx-latest .
30+
docker build -f src/tests/ratelimit/Dockerfile.anotherip -t anotherip .
2731
- name: run docker images
2832
run: |
2933
docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &
3034
docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest
3135
docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip
3236
3337
- name: install dependencies and create symlink for ep_etherpad-lite
34-
run: bin/installDeps.sh
38+
run: src/bin/installDeps.sh
3539

3640
- name: run rate limit test
3741
run: |
38-
cd tests/ratelimit
42+
cd src/tests/ratelimit
3943
./testlimits.sh

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ node_modules
33
!settings.json.template
44
APIKEY.txt
55
SESSIONKEY.txt
6-
bin/abiword.exe
7-
bin/node.exe
86
etherpad-lite-win.zip
97
var/dirty.db
10-
bin/convertSettings.json
118
*~
129
*.patch
1310
npm-debug.log
1411
*.DS_Store
1512
.ep_initialized
1613
*.crt
1714
*.key
18-
bin/etherpad-1.deb
1915
credentials.json
2016
out/
2117
.nyc_output
22-
./package-lock.json
2318
.idea
19+
/package-lock.json
20+
/src/bin/abiword.exe
21+
/src/bin/convertSettings.json
22+
/src/bin/etherpad-1.deb
23+
/src/bin/node.exe

0 commit comments

Comments
 (0)