Added initial bun support.

This commit is contained in:
SamTV12345 2023-10-02 19:06:25 +02:00
parent b6ce8c7377
commit 8be2dffc37
9 changed files with 32 additions and 9619 deletions

View file

@ -18,19 +18,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
node: [1.0.3, canary]
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v3
uses: oven-sh/setup-bun@v1
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
bun-version: ${{ matrix.node }}
-
name: Install libreoffice
run: |
@ -42,7 +38,7 @@ jobs:
run: src/bin/installDeps.sh
-
name: Run the backend tests
run: cd src && npm test
run: cd src && bun test
withpluginsLinux:
# run on pushes to any branch
@ -55,19 +51,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
node: [1.0.3, canary]
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v3
uses: oven-sh/setup-bun@v1
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
bun-version: ${{ matrix.node }}
-
name: Install libreoffice
run: |
@ -76,10 +68,8 @@ jobs:
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
bun install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
@ -93,21 +83,12 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, 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
-
name: Run the backend tests
run: cd src && npm test
run: cd src && bun run test
withoutpluginsWindows:
# run on pushes to any branch
@ -122,13 +103,9 @@ jobs:
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v3
uses: oven-sh/setup-bun@v1
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
bun-version: latest
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installOnWindows.bat
@ -139,7 +116,7 @@ jobs:
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
run: cd src && bun run test
withpluginsWindows:
# run on pushes to any branch
@ -155,19 +132,13 @@ jobs:
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v3
uses: oven-sh/setup-bun@v1
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
bun-version: latest
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm
# v7: https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
bun install --no-save
ep_align
ep_author_hover
ep_cursortrace
@ -181,15 +152,6 @@ jobs:
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, 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/installOnWindows.bat
@ -200,4 +162,4 @@ jobs:
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
run: cd src && bun run test