Skip to content

Commit 020f5ff

Browse files
committed
Merge branch 'develop' into master
2 parents 2c8769a + d9262fc commit 020f5ff

367 files changed

Lines changed: 48120 additions & 23516 deletions

File tree

Some content is hidden

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

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: ether
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Backend tests"
2+
3+
# any branch is useful for testing before a PR is submitted
4+
on: [push, pull_request]
5+
6+
jobs:
7+
withoutplugins:
8+
# run on pushes to any branch
9+
# run on PRs from external forks
10+
if: |
11+
(github.event_name != 'pull_request')
12+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
13+
name: without plugins
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: Install libreoffice
21+
run: |
22+
sudo add-apt-repository -y ppa:libreoffice/ppa
23+
sudo apt update
24+
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
25+
26+
- name: Install all dependencies and symlink for ep_etherpad-lite
27+
run: bin/installDeps.sh
28+
29+
# configures some settings and runs npm run test
30+
- name: Run the backend tests
31+
run: tests/frontend/travis/runnerBackend.sh
32+
33+
withplugins:
34+
# run on pushes to any branch
35+
# run on PRs from external forks
36+
if: |
37+
(github.event_name != 'pull_request')
38+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
39+
name: with Plugins
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v2
45+
46+
- name: Install libreoffice
47+
run: |
48+
sudo add-apt-repository -y ppa:libreoffice/ppa
49+
sudo apt update
50+
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
51+
52+
- name: Install all dependencies and symlink for ep_etherpad-lite
53+
run: bin/installDeps.sh
54+
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
57+
58+
# configures some settings and runs npm run test
59+
- name: Run the backend tests
60+
run: tests/frontend/travis/runnerBackend.sh

.github/workflows/dockerfile.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Dockerfile"
2+
3+
# any branch is useful for testing before a PR is submitted
4+
on: [push, pull_request]
5+
6+
jobs:
7+
dockerfile:
8+
# run on pushes to any branch
9+
# run on PRs from external forks
10+
if: |
11+
(github.event_name != 'pull_request')
12+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
13+
name: build image and run connectivity test
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: docker build
21+
run: |
22+
docker build -t etherpad:test .
23+
docker run -d -p 9001:9001 etherpad:test
24+
./bin/installDeps.sh
25+
sleep 3 # delay for startup?
26+
cd src && npm run test-container
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "Frontend tests"
2+
3+
on: [push]
4+
5+
jobs:
6+
withoutplugins:
7+
name: without plugins
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
14+
- name: Run sauce-connect-action
15+
shell: bash
16+
env:
17+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
18+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
19+
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
20+
run: tests/frontend/travis/sauce_tunnel.sh
21+
22+
- name: Install all dependencies and symlink for ep_etherpad-lite
23+
run: bin/installDeps.sh
24+
25+
- name: export GIT_HASH to env
26+
id: environment
27+
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
28+
29+
- name: Write custom settings.json with loglevel WARN
30+
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
31+
32+
- name: Run the frontend tests
33+
shell: bash
34+
env:
35+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
36+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
37+
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
38+
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
39+
run: |
40+
tests/frontend/travis/runner.sh
41+
42+
withplugins:
43+
name: with plugins
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v2
49+
50+
- name: Run sauce-connect-action
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+
run: tests/frontend/travis/sauce_tunnel.sh
57+
58+
- 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
63+
64+
- name: export GIT_HASH to env
65+
id: environment
66+
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
67+
68+
- name: Write custom settings.json with loglevel WARN
69+
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"
70+
71+
# XXX we should probably run all tests, because plugins could effect their results
72+
- name: Remove standard frontend test files, so only plugin tests are run
73+
run: rm tests/frontend/specs/*
74+
75+
- name: Run the frontend tests
76+
shell: bash
77+
env:
78+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
79+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
80+
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
81+
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
82+
run: |
83+
tests/frontend/travis/runner.sh
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Lint"
2+
3+
# any branch is useful for testing before a PR is submitted
4+
on: [push, pull_request]
5+
6+
jobs:
7+
lint-package-lock:
8+
# run on pushes to any branch
9+
# run on PRs from external forks
10+
if: |
11+
(github.event_name != 'pull_request')
12+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
13+
name: package-lock.json
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: Install lockfile-lint
21+
run: npm install lockfile-lint
22+
23+
- name: Run lockfile-lint on package-lock.json
24+
run: npx lockfile-lint --path src/package-lock.json --validate-https --allowed-hosts npm

.github/workflows/load-test.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Loadtest"
2+
3+
# any branch is useful for testing before a PR is submitted
4+
on: [push, pull_request]
5+
6+
jobs:
7+
withoutplugins:
8+
# run on pushes to any branch
9+
# run on PRs from external forks
10+
if: |
11+
(github.event_name != 'pull_request')
12+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
13+
name: without plugins
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: Install all dependencies and symlink for ep_etherpad-lite
21+
run: bin/installDeps.sh
22+
23+
- name: Install etherpad-load-test
24+
run: sudo npm install -g etherpad-load-test
25+
26+
- name: Run load test
27+
run: tests/frontend/travis/runnerLoadTest.sh
28+
29+
withplugins:
30+
# run on pushes to any branch
31+
# run on PRs from external forks
32+
if: |
33+
(github.event_name != 'pull_request')
34+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
35+
name: with Plugins
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
41+
42+
- name: Install all dependencies and symlink for ep_etherpad-lite
43+
run: bin/installDeps.sh
44+
45+
- name: Install etherpad-load-test
46+
run: sudo npm install -g etherpad-load-test
47+
48+
- 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
50+
51+
# configures some settings and runs npm run test
52+
- name: Run load test
53+
run: tests/frontend/travis/runnerLoadTest.sh

.github/workflows/rate-limit.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "rate limit"
2+
3+
# any branch is useful for testing before a PR is submitted
4+
on: [push, pull_request]
5+
6+
jobs:
7+
ratelimit:
8+
# run on pushes to any branch
9+
# run on PRs from external forks
10+
if: |
11+
(github.event_name != 'pull_request')
12+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
13+
name: test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
19+
- name: docker network
20+
run: docker network create --subnet=172.23.42.0/16 ep_net
21+
22+
- name: build docker image
23+
run: |
24+
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 .
27+
- name: run docker images
28+
run: |
29+
docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &
30+
docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest
31+
docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip
32+
33+
- name: install dependencies and create symlink for ep_etherpad-lite
34+
run: bin/installDeps.sh
35+
36+
- name: run rate limit test
37+
run: |
38+
cd tests/ratelimit
39+
./testlimits.sh

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ var/dirty.db
1010
bin/convertSettings.json
1111
*~
1212
*.patch
13-
src/static/js/jquery.js
1413
npm-debug.log
1514
*.DS_Store
1615
.ep_initialized

0 commit comments

Comments
 (0)