2012-10-28 16:40:42 +01:00
|
|
|
language: node_js
|
2019-12-21 09:07:11 +01:00
|
|
|
|
2012-10-28 16:40:42 +01:00
|
|
|
node_js:
|
2018-08-27 10:05:35 +02:00
|
|
|
- "lts/*"
|
2019-12-21 09:07:11 +01:00
|
|
|
|
2019-12-01 15:38:47 +01:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2020-05-29 22:42:44 +02:00
|
|
|
cache: false
|
2020-05-29 13:28:31 +02:00
|
|
|
|
2012-10-28 17:48:51 +01:00
|
|
|
env:
|
|
|
|
global:
|
2013-06-06 19:16:04 +02:00
|
|
|
- secure: "WMGxFkOeTTlhWB+ChMucRtIqVmMbwzYdNHuHQjKCcj8HBEPdZLfCuK/kf4rG\nVLcLQiIsyllqzNhBGVHG1nyqWr0/LTm8JRqSCDDVIhpyzp9KpCJQQJG2Uwjk\n6/HIJJh/wbxsEdLNV2crYU/EiVO3A4Bq0YTHUlbhUqG3mSCr5Ec="
|
|
|
|
- secure: "gejXUAHYscbR6Bodw35XexpToqWkv2ifeECsbeEmjaLkYzXmUUNWJGknKSu7\nEUsSfQV8w+hxApr1Z+jNqk9aX3K1I4btL3cwk2trnNI8XRAvu1c1Iv60eerI\nkE82Rsd5lwUaMEh+/HoL8ztFCZamVndoNgX7HWp5J/NRZZMmh4g="
|
2019-12-21 09:07:11 +01:00
|
|
|
|
2020-11-21 02:59:30 +01:00
|
|
|
_set_loglevel_warn: &set_loglevel_warn |
|
|
|
|
sed -e 's/"loglevel":[^,]*/"loglevel": "WARN"/' \
|
|
|
|
settings.json.template >settings.json.template.new &&
|
|
|
|
mv settings.json.template.new settings.json.template
|
|
|
|
|
2020-11-21 02:57:43 +01:00
|
|
|
_install_libreoffice: &install_libreoffice >-
|
|
|
|
sudo add-apt-repository -y ppa:libreoffice/ppa &&
|
|
|
|
sudo apt-get update &&
|
|
|
|
sudo apt-get -y install libreoffice libreoffice-pdfimport
|
|
|
|
|
2020-10-29 19:35:10 +01:00
|
|
|
_install_plugins: &install_plugins >-
|
|
|
|
npm install
|
|
|
|
ep_align
|
|
|
|
ep_author_hover
|
|
|
|
ep_cursortrace
|
|
|
|
ep_font_size
|
|
|
|
ep_hash_auth
|
|
|
|
ep_headings2
|
|
|
|
ep_markdown
|
2020-10-30 06:34:11 +01:00
|
|
|
ep_readonly_guest
|
2020-10-29 19:35:10 +01:00
|
|
|
ep_spellcheck
|
|
|
|
ep_subscript_and_superscript
|
|
|
|
ep_table_of_contents
|
2020-11-26 15:10:10 +01:00
|
|
|
ep_set_title_on_pad
|
2020-10-29 19:35:10 +01:00
|
|
|
|
2019-12-21 10:10:35 +01:00
|
|
|
jobs:
|
2020-06-08 13:45:03 +02:00
|
|
|
include:
|
2020-06-08 14:51:57 +02:00
|
|
|
# we can only frontend tests from the ether/ organization and not from forks.
|
|
|
|
# To request tests to be run ask a maintainer to fork your repo to ether/
|
|
|
|
- if: fork = false
|
2020-09-26 20:41:33 +02:00
|
|
|
name: "Test the Frontend without Plugins"
|
2020-06-08 13:39:20 +02:00
|
|
|
install:
|
2020-11-21 02:59:30 +01:00
|
|
|
- *set_loglevel_warn
|
2020-06-08 18:18:22 +02:00
|
|
|
- "tests/frontend/travis/sauce_tunnel.sh"
|
2020-06-08 13:39:20 +02:00
|
|
|
- "bin/installDeps.sh"
|
|
|
|
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
|
|
|
|
script:
|
2020-11-10 06:59:50 +01:00
|
|
|
- "./tests/frontend/travis/runner.sh"
|
2020-09-26 20:41:33 +02:00
|
|
|
- name: "Run the Backend tests without Plugins"
|
2020-04-03 03:27:05 +02:00
|
|
|
install:
|
2020-11-21 02:57:43 +01:00
|
|
|
- *install_libreoffice
|
2020-11-21 03:04:54 +01:00
|
|
|
- *set_loglevel_warn
|
2020-05-29 14:26:34 +02:00
|
|
|
- "bin/installDeps.sh"
|
2020-04-03 03:27:05 +02:00
|
|
|
- "cd src && npm install && cd -"
|
|
|
|
script:
|
|
|
|
- "tests/frontend/travis/runnerBackend.sh"
|
2020-10-06 15:21:09 +02:00
|
|
|
- name: "Test the Dockerfile"
|
|
|
|
install:
|
|
|
|
- "cd src && npm install && cd -"
|
|
|
|
script:
|
|
|
|
- "docker build -t etherpad:test ."
|
|
|
|
- "docker run -d -p 9001:9001 etherpad:test && sleep 3"
|
|
|
|
- "cd src && npm run test-container"
|
2020-09-26 20:41:33 +02:00
|
|
|
- name: "Load test Etherpad without Plugins"
|
2020-05-30 20:17:33 +02:00
|
|
|
install:
|
2020-11-21 03:04:54 +01:00
|
|
|
- *set_loglevel_warn
|
2020-05-30 20:17:33 +02:00
|
|
|
- "bin/installDeps.sh"
|
|
|
|
- "cd src && npm install && cd -"
|
2020-05-30 20:22:24 +02:00
|
|
|
- "npm install -g etherpad-load-test"
|
2020-05-30 20:17:33 +02:00
|
|
|
script:
|
|
|
|
- "tests/frontend/travis/runnerLoadTest.sh"
|
2020-09-26 20:41:33 +02:00
|
|
|
# we can only frontend tests from the ether/ organization and not from forks.
|
|
|
|
# To request tests to be run ask a maintainer to fork your repo to ether/
|
|
|
|
- if: fork = false
|
|
|
|
name: "Test the Frontend Plugins only"
|
|
|
|
install:
|
2020-11-21 02:59:30 +01:00
|
|
|
- *set_loglevel_warn
|
2020-09-26 20:41:33 +02:00
|
|
|
- "tests/frontend/travis/sauce_tunnel.sh"
|
|
|
|
- "bin/installDeps.sh"
|
|
|
|
- "rm tests/frontend/specs/*"
|
2020-10-29 19:35:10 +01:00
|
|
|
- *install_plugins
|
2020-09-26 20:41:33 +02:00
|
|
|
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
|
|
|
|
script:
|
2020-11-10 06:59:50 +01:00
|
|
|
- "./tests/frontend/travis/runner.sh"
|
2020-10-29 19:07:36 +01:00
|
|
|
- name: "Lint test package-lock.json"
|
|
|
|
install:
|
|
|
|
- "npm install lockfile-lint"
|
|
|
|
script:
|
|
|
|
- npx lockfile-lint --path src/package-lock.json --validate-https --allowed-hosts npm
|
2020-09-26 20:41:33 +02:00
|
|
|
- name: "Run the Backend tests with Plugins"
|
|
|
|
install:
|
2020-11-21 02:57:43 +01:00
|
|
|
- *install_libreoffice
|
2020-11-21 03:04:54 +01:00
|
|
|
- *set_loglevel_warn
|
2020-09-26 20:41:33 +02:00
|
|
|
- "bin/installDeps.sh"
|
2020-10-29 19:35:10 +01:00
|
|
|
- *install_plugins
|
2020-09-26 20:41:33 +02:00
|
|
|
- "cd src && npm install && cd -"
|
|
|
|
script:
|
|
|
|
- "tests/frontend/travis/runnerBackend.sh"
|
2020-10-06 15:21:09 +02:00
|
|
|
- name: "Test the Dockerfile"
|
|
|
|
install:
|
|
|
|
- "cd src && npm install && cd -"
|
|
|
|
script:
|
|
|
|
- "docker build -t etherpad:test ."
|
|
|
|
- "docker run -d -p 9001:9001 etherpad:test && sleep 3"
|
|
|
|
- "cd src && npm run test-container"
|
2020-09-26 20:41:33 +02:00
|
|
|
- name: "Load test Etherpad with Plugins"
|
|
|
|
install:
|
2020-11-21 03:04:54 +01:00
|
|
|
- *set_loglevel_warn
|
2020-09-26 20:41:33 +02:00
|
|
|
- "bin/installDeps.sh"
|
2020-10-29 19:35:10 +01:00
|
|
|
- *install_plugins
|
2020-09-26 20:41:33 +02:00
|
|
|
- "cd src && npm install && cd -"
|
|
|
|
- "npm install -g etherpad-load-test"
|
|
|
|
script:
|
|
|
|
- "tests/frontend/travis/runnerLoadTest.sh"
|
2020-10-01 11:39:01 +02:00
|
|
|
- name: "Test rate limit"
|
|
|
|
install:
|
|
|
|
- "docker network create --subnet=172.23.42.0/16 ep_net"
|
|
|
|
- "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 run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest"
|
|
|
|
- "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 --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip"
|
|
|
|
- "./bin/installDeps.sh"
|
|
|
|
script:
|
|
|
|
- "cd tests/ratelimit && bash testlimits.sh"
|
2019-12-21 10:10:35 +01:00
|
|
|
|
2012-10-28 16:40:42 +01:00
|
|
|
notifications:
|
2012-11-03 15:36:59 +01:00
|
|
|
irc:
|
|
|
|
channels:
|
2013-04-15 17:33:20 +02:00
|
|
|
- "irc.freenode.org#etherpad-lite-dev"
|