2020-11-24 18:12:41 +00:00
|
|
|
name: "Backend tests"
|
|
|
|
|
|
|
|
# any branch is useful for testing before a PR is submitted
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
2022-04-26 01:08:54 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-24 18:12:41 +00:00
|
|
|
jobs:
|
2021-02-18 18:49:43 +00:00
|
|
|
withoutpluginsLinux:
|
2020-11-24 18:12:41 +00:00
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 06:33:52 +00:00
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-02-18 18:49:43 +00:00
|
|
|
name: Linux without plugins
|
2020-11-24 18:12:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-02-12 01:00:28 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-06-26 17:11:32 +00:00
|
|
|
node: [16, 18, 20]
|
2020-11-24 18:12:41 +00:00
|
|
|
steps:
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2022-03-01 22:17:16 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
2022-02-25 15:32:24 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: |
|
|
|
|
src/package-lock.json
|
|
|
|
src/bin/doc/package-lock.json
|
|
|
|
-
|
|
|
|
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
|
|
|
|
-
|
2023-07-05 18:48:58 +00:00
|
|
|
name: Install the ep_etherpad-lite package from ./src
|
2022-01-28 06:33:52 +00:00
|
|
|
run: src/bin/installDeps.sh
|
|
|
|
-
|
|
|
|
name: Run the backend tests
|
|
|
|
run: cd src && npm test
|
2020-11-24 18:12:41 +00:00
|
|
|
|
2021-02-18 18:49:43 +00:00
|
|
|
withpluginsLinux:
|
2020-11-24 18:12:41 +00:00
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 06:33:52 +00:00
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-02-18 18:49:43 +00:00
|
|
|
name: Linux with Plugins
|
2020-11-24 18:12:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-02-12 01:00:28 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-06-26 17:11:32 +00:00
|
|
|
node: [16, 18, 20]
|
2020-11-24 18:12:41 +00:00
|
|
|
steps:
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2022-03-01 22:17:16 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
2022-02-25 15:32:24 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: |
|
|
|
|
src/package-lock.json
|
|
|
|
src/bin/doc/package-lock.json
|
|
|
|
-
|
|
|
|
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
|
2023-07-05 18:48:58 +00:00
|
|
|
-
|
|
|
|
name: Install the ep_etherpad-lite package from ./src
|
|
|
|
run: src/bin/installDeps.sh
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
name: Install Etherpad plugins
|
|
|
|
run: >
|
2023-07-05 18:48:58 +00:00
|
|
|
npm install
|
2022-01-28 06:33:52 +00:00
|
|
|
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: Run the backend tests
|
|
|
|
run: cd src && npm test
|
2021-02-18 18:49:43 +00:00
|
|
|
|
|
|
|
withoutpluginsWindows:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 06:33:52 +00:00
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-02-18 18:49:43 +00:00
|
|
|
name: Windows without plugins
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2022-03-01 22:17:16 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
2022-02-25 15:32:24 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
with:
|
2023-06-26 17:11:32 +00:00
|
|
|
node-version: 20
|
2022-01-28 06:33:52 +00:00
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: |
|
|
|
|
src/package-lock.json
|
|
|
|
src/bin/doc/package-lock.json
|
|
|
|
-
|
2023-07-05 18:48:58 +00:00
|
|
|
name: Install the ep_etherpad-lite package from ./src
|
2022-01-28 06:33:52 +00:00
|
|
|
run: src/bin/installOnWindows.bat
|
2023-07-05 18:48:58 +00:00
|
|
|
-
|
|
|
|
name: Run npm i once to make bin files available - why is this needed at all?
|
|
|
|
run: npm i
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
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
|
2023-07-05 18:48:58 +00:00
|
|
|
run: cd src && npm run test-on-windows
|
2021-02-18 18:49:43 +00:00
|
|
|
|
|
|
|
withpluginsWindows:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 06:33:52 +00:00
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-02-18 18:49:43 +00:00
|
|
|
name: Windows with Plugins
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2022-03-01 22:17:16 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
2022-02-25 15:32:24 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-28 06:33:52 +00:00
|
|
|
with:
|
2023-06-26 17:11:32 +00:00
|
|
|
node-version: 20
|
2022-01-28 06:33:52 +00:00
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: |
|
|
|
|
src/package-lock.json
|
|
|
|
src/bin/doc/package-lock.json
|
2023-07-05 18:48:58 +00:00
|
|
|
-
|
|
|
|
name: Install the ep_etherpad-lite package from ./src
|
|
|
|
run: src/bin/installOnWindows.bat
|
|
|
|
-
|
|
|
|
name: Run npm i once to make bin files available - why is this needed at all?
|
|
|
|
run: npm i
|
2022-01-28 06:33:52 +00:00
|
|
|
-
|
|
|
|
name: Install Etherpad plugins
|
|
|
|
run: >
|
2023-07-05 18:48:58 +00:00
|
|
|
npm install
|
2022-01-28 06:33:52 +00:00
|
|
|
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: 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
|
2023-07-05 18:48:58 +00:00
|
|
|
run: cd src && npm run test-on-windows
|