2020-11-24 19:12:41 +01:00
|
|
|
name: "Backend tests"
|
|
|
|
|
|
|
|
# any branch is useful for testing before a PR is submitted
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-02-18 19:49:43 +01:00
|
|
|
withoutpluginsLinux:
|
2020-11-24 19:12:41 +01:00
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-02-18 19:49:43 +01:00
|
|
|
name: Linux without plugins
|
2020-11-24 19:12:41 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-02-09 07:02:16 +01:00
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
|
2020-11-24 19:12:41 +01:00
|
|
|
- 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
|
2021-02-05 00:43:27 +01:00
|
|
|
run: src/bin/installDeps.sh
|
2020-11-24 19:12:41 +01:00
|
|
|
|
|
|
|
- name: Run the backend tests
|
2021-02-17 00:35:50 +01:00
|
|
|
run: cd src && npm test
|
2020-11-24 19:12:41 +01:00
|
|
|
|
2021-02-18 19:49:43 +01:00
|
|
|
withpluginsLinux:
|
2020-11-24 19:12:41 +01:00
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-02-18 19:49:43 +01:00
|
|
|
name: Linux with Plugins
|
2020-11-24 19:12:41 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-02-09 07:02:16 +01:00
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
|
2020-11-24 19:12:41 +01:00
|
|
|
- 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
|
|
|
|
|
2021-01-24 00:04:20 +01:00
|
|
|
- name: Install Etherpad plugins
|
|
|
|
run: >
|
|
|
|
npm install
|
|
|
|
ep_align
|
|
|
|
ep_author_hover
|
|
|
|
ep_cursortrace
|
|
|
|
ep_font_size
|
|
|
|
ep_hash_auth
|
|
|
|
ep_headings2
|
2021-02-12 15:01:52 +01:00
|
|
|
ep_image_upload
|
2021-01-24 00:04:20 +01:00
|
|
|
ep_markdown
|
|
|
|
ep_readonly_guest
|
2021-01-24 00:12:18 +01:00
|
|
|
ep_set_title_on_pad
|
2021-01-24 00:04:20 +01:00
|
|
|
ep_spellcheck
|
|
|
|
ep_subscript_and_superscript
|
|
|
|
ep_table_of_contents
|
2020-11-24 19:12:41 +01:00
|
|
|
|
2021-01-24 00:06:50 +01:00
|
|
|
# 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
|
2021-02-05 00:43:27 +01:00
|
|
|
run: src/bin/installDeps.sh
|
2021-01-24 00:06:50 +01:00
|
|
|
|
2020-11-24 19:12:41 +01:00
|
|
|
- name: Run the backend tests
|
2021-02-17 00:35:50 +01:00
|
|
|
run: cd src && npm test
|
2021-02-18 19:49:43 +01:00
|
|
|
|
|
|
|
withoutpluginsWindows:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|
|
|
name: Windows without plugins
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- 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: |
|
|
|
|
cd src
|
|
|
|
npm ci --no-optional
|
|
|
|
|
|
|
|
- name: Fix up the settings.json
|
|
|
|
run: |
|
|
|
|
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
|
|
|
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
|
|
|
|
|
|
|
- name: Run the backend tests
|
|
|
|
run: cd src && npm test
|
|
|
|
|
|
|
|
withpluginsWindows:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|
|
|
name: Windows with Plugins
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
|
|
|
|
- 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: |
|
|
|
|
cd src
|
|
|
|
npm ci --no-optional
|
|
|
|
|
|
|
|
- name: Fix up the settings.json
|
|
|
|
run: |
|
|
|
|
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
|
|
|
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
|
|
|
|
|
|
|
- name: Run the backend tests
|
|
|
|
run: cd src && npm test
|