Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhansen committed Feb 15, 2021
2 parents 01a763e + c0f73e6 commit 113df1f
Show file tree
Hide file tree
Showing 310 changed files with 11,257 additions and 21,493 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Install libreoffice
run: |
sudo add-apt-repository -y ppa:libreoffice/ppa
sudo apt update
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
- name: Install all dependencies and symlink for ep_etherpad-lite
run: bin/installDeps.sh
run: src/bin/installDeps.sh

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

withplugins:
# run on pushes to any branch
Expand All @@ -43,18 +47,43 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Install libreoffice
run: |
sudo add-apt-repository -y ppa:libreoffice/ppa
sudo apt update
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
- name: Install all dependencies and symlink for ep_etherpad-lite
run: bin/installDeps.sh
- name: Install Etherpad plugins
run: >
npm install
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
- name: Install etherpad plugins
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
# This must be run after installing the plugins, otherwise npm will try to
# hoist common dependencies by removing them from src/node_modules and
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
# logic appears to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules. Even
# if npm correctly hoists the dependencies, the hoisting seems to confuse
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
- name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh

# configures some settings and runs npm run test
- name: Run the backend tests
run: tests/frontend/travis/runnerBackend.sh
run: src/tests/frontend/travis/runnerBackend.sh
2 changes: 1 addition & 1 deletion .github/workflows/dockerfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
run: |
docker build -t etherpad:test .
docker run -d -p 9001:9001 etherpad:test
./bin/installDeps.sh
./src/bin/installDeps.sh
sleep 3 # delay for startup?
cd src && npm run test-container
58 changes: 58 additions & 0 deletions .github/workflows/frontend-admin-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: "Frontend admin tests"

on: [push]

jobs:
withplugins:
name: with plugins
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Run sauce-connect-action
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
run: src/tests/frontend/travis/sauce_tunnel.sh

- name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh

# We intentionally install a much old ep_align version to test update minor versions
- name: Install etherpad plugins
run: npm install [email protected]

# Nuke plugin tests
- name: Install etherpad plugins
run: rm -Rf node_modules/ep_align/static/tests/*

- name: export GIT_HASH to env
id: environment
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"

- name: Write custom settings.json with loglevel WARN
run: "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/' < settings.json.template > settings.json"

- name: Write custom settings.json that enables the Admin UI tests
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"

- name: Remove standard frontend test files, so only admin tests are run
run: mv src/tests/frontend/specs/* /tmp && mv /tmp/admin*.js src/tests/frontend/specs

- name: Run the frontend admin tests
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
src/tests/frontend/travis/adminrunner.sh
54 changes: 43 additions & 11 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Run sauce-connect-action
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
run: tests/frontend/travis/sauce_tunnel.sh
run: src/tests/frontend/travis/sauce_tunnel.sh

- name: Install all dependencies and symlink for ep_etherpad-lite
run: bin/installDeps.sh
run: src/bin/installDeps.sh

- name: export GIT_HASH to env
id: environment
Expand All @@ -37,7 +41,7 @@ jobs:
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
tests/frontend/travis/runner.sh
src/tests/frontend/travis/runner.sh
withplugins:
name: with plugins
Expand All @@ -47,19 +51,44 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Run sauce-connect-action
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
run: tests/frontend/travis/sauce_tunnel.sh

run: src/tests/frontend/travis/sauce_tunnel.sh

- name: Install Etherpad plugins
run: >
npm install
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# This must be run after installing the plugins, otherwise npm will try to
# hoist common dependencies by removing them from src/node_modules and
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
# logic appears to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules. Even
# if npm correctly hoists the dependencies, the hoisting seems to confuse
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
- name: Install all dependencies and symlink for ep_etherpad-lite
run: bin/installDeps.sh

- name: Install etherpad plugins
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
run: src/bin/installDeps.sh

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

- name: Write custom settings.json that enables the Admin UI tests
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"

# XXX we should probably run all tests, because plugins could effect their results
- name: Remove standard frontend test files, so only plugin tests are run
run: rm tests/frontend/specs/*
run: rm src/tests/frontend/specs/*

- name: Run the frontend tests
shell: bash
Expand All @@ -80,4 +112,4 @@ jobs:
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
tests/frontend/travis/runner.sh
src/tests/frontend/travis/runner.sh
4 changes: 4 additions & 0 deletions .github/workflows/lint-package-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Install lockfile-lint
run: npm install lockfile-lint

Expand Down
40 changes: 34 additions & 6 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: Install all dependencies and symlink for ep_etherpad-lite
run: bin/installDeps.sh
run: src/bin/installDeps.sh

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

- name: Run load test
run: tests/frontend/travis/runnerLoadTest.sh
run: src/tests/frontend/travis/runnerLoadTest.sh

withplugins:
# run on pushes to any branch
Expand All @@ -39,15 +43,39 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install all dependencies and symlink for ep_etherpad-lite
run: bin/installDeps.sh
- uses: actions/setup-node@v2
with:
node-version: 12

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

- name: Install etherpad plugins
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
run: >
npm install
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# This must be run after installing the plugins, otherwise npm will try to
# hoist common dependencies by removing them from src/node_modules and
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
# logic appears to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules. Even
# if npm correctly hoists the dependencies, the hoisting seems to confuse
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
- name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh

# configures some settings and runs npm run test
- name: Run load test
run: tests/frontend/travis/runnerLoadTest.sh
run: src/tests/frontend/travis/runnerLoadTest.sh
12 changes: 8 additions & 4 deletions .github/workflows/rate-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,28 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12

- name: docker network
run: docker network create --subnet=172.23.42.0/16 ep_net

- name: build docker image
run: |
docker build -f Dockerfile -t epl-debian-slim .
docker build -f tests/ratelimit/Dockerfile.nginx -t nginx-latest .
docker build -f tests/ratelimit/Dockerfile.anotherip -t anotherip .
docker build -f src/tests/ratelimit/Dockerfile.nginx -t nginx-latest .
docker build -f src/tests/ratelimit/Dockerfile.anotherip -t anotherip .
- name: run docker images
run: |
docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &
docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest
docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip
- name: install dependencies and create symlink for ep_etherpad-lite
run: bin/installDeps.sh
run: src/bin/installDeps.sh

- name: run rate limit test
run: |
cd tests/ratelimit
cd src/tests/ratelimit
./testlimits.sh
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ node_modules
!settings.json.template
APIKEY.txt
SESSIONKEY.txt
bin/abiword.exe
bin/node.exe
etherpad-lite-win.zip
var/dirty.db
bin/convertSettings.json
*~
*.patch
npm-debug.log
*.DS_Store
.ep_initialized
*.crt
*.key
bin/etherpad-1.deb
credentials.json
out/
.nyc_output
./package-lock.json
.idea
/package-lock.json
/src/bin/abiword.exe
/src/bin/convertSettings.json
/src/bin/etherpad-1.deb
/src/bin/node.exe
Loading

0 comments on commit 113df1f

Please sign in to comment.