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]
|
|
|
|
|
2022-04-26 03:08:54 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-24 19:12:41 +01:00
|
|
|
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: |
|
2022-01-28 07:33:52 +01:00
|
|
|
(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
|
2021-02-12 02:00:28 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-10-02 19:06:25 +02:00
|
|
|
node: [1.0.3, canary]
|
2020-11-24 19:12:41 +01:00
|
|
|
steps:
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2023-09-04 18:51:22 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2023-10-02 19:06:25 +02:00
|
|
|
uses: oven-sh/setup-bun@v1
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
2023-10-02 19:06:25 +02:00
|
|
|
bun-version: ${{ matrix.node }}
|
2022-01-28 07:33:52 +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
|
|
|
|
run: src/bin/installDeps.sh
|
|
|
|
-
|
|
|
|
name: Run the backend tests
|
2023-10-02 19:06:25 +02:00
|
|
|
run: cd src && bun 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: |
|
2022-01-28 07:33:52 +01:00
|
|
|
(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
|
2021-02-12 02:00:28 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-10-02 19:06:25 +02:00
|
|
|
node: [1.0.3, canary]
|
2020-11-24 19:12:41 +01:00
|
|
|
steps:
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2023-09-04 18:51:22 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2023-10-02 19:06:25 +02:00
|
|
|
uses: oven-sh/setup-bun@v1
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
2023-10-02 19:06:25 +02:00
|
|
|
bun-version: ${{ matrix.node }}
|
2022-01-28 07:33:52 +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 Etherpad plugins
|
|
|
|
run: >
|
2023-10-02 19:06:25 +02:00
|
|
|
bun install --no-save --legacy-peer-deps
|
2022-01-28 07:33:52 +01: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: Install all dependencies and symlink for ep_etherpad-lite
|
|
|
|
run: src/bin/installDeps.sh
|
|
|
|
-
|
|
|
|
name: Run the backend tests
|
2023-10-02 19:06:25 +02:00
|
|
|
run: cd src && bun run test
|
2021-02-18 19:49:43 +01:00
|
|
|
|
|
|
|
withoutpluginsWindows:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 07:33:52 +01:00
|
|
|
(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: Windows without plugins
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2023-09-04 18:51:22 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2023-10-02 19:06:25 +02:00
|
|
|
uses: oven-sh/setup-bun@v1
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
2023-10-02 19:06:25 +02:00
|
|
|
bun-version: latest
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
|
|
run: src/bin/installOnWindows.bat
|
|
|
|
-
|
|
|
|
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-10-02 19:06:25 +02:00
|
|
|
run: cd src && bun run test
|
2021-02-18 19:49:43 +01:00
|
|
|
|
|
|
|
withpluginsWindows:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 07:33:52 +01:00
|
|
|
(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: Windows with Plugins
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Checkout repository
|
2023-09-04 18:51:22 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2023-10-02 19:06:25 +02:00
|
|
|
uses: oven-sh/setup-bun@v1
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
2023-10-02 19:06:25 +02:00
|
|
|
bun-version: latest
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Install Etherpad plugins
|
|
|
|
run: >
|
2023-10-02 19:06:25 +02:00
|
|
|
bun install --no-save
|
2022-01-28 07:33:52 +01: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: Install all dependencies and symlink for ep_etherpad-lite
|
|
|
|
run: src/bin/installOnWindows.bat
|
|
|
|
-
|
|
|
|
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-10-02 19:06:25 +02:00
|
|
|
run: cd src && bun run test
|