mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 02:16:16 -04:00
Use npm link
to install ep_etherpad-lite. This places a package.json
file in the root directory that references ./src directory as the file source for `ep_etherpad-lite`. Remove --legacy-peer-deps and --no-save when invoking npm. There is no need for them anymore, as we are bumping npm now to v8. ./src/package.json contains all dependencies of Etherpad core (package name ep_etherpad-lite) as before. The root directory's package.json file references ep_etherpad-lite and also contains references to any installed plugins. Remove npm from package.json as we depend on a recent version now; PATH is still updated as before, so in the future we may install a custom npm version again lint package-lock: update exception for sqlite3 remove node_modules and package.json during installDeps.sh update Dockerfile adapt minify windows build Fixed installOnWindows.bat remove node_modules from git bump minimal node/npm version in src/bin/functions.sh add changelog notes update installdeps fix dockerfile docker: test npm prefix set to the etherpad directory workflow: upgrade-from-latest-release needs to be adapted until next release is out Revert "docker: test npm prefix set to the etherpad directory" This reverts commit b856a2488c9dbfb2acf35309cd1ee83016b631ad. use npm link --bin-links=false to prevent it from copying bin files temp fix for scripts as they are not installed to bin directory anymore adjust bin paths in Dockerfile Dockerfile add hint for npm link, dockerfile update dockerfile Revert "Fixed installOnWindows.bat" This reverts commit 70d0716bbedc4c0c1043155fcc5d157f01775c61. try installOnWindows; still TODO: no difference between production and development; no warning like in installDeps.sh before update - it just removes package* and node_modules so admins must be aware of the plugins they want to reinstall later update installOnWindows.bat update package-lock.json Dockerfile Dockerfile add file: scheme for lint check - needed as long as we have the plugin compatibility symlinks in ./src/node_modules fix installOnWindows upgrade-from-latest-release workflow: adapt cypress installation src/package.json: test-container fix path to _mocha; maybe revert this in case we enable bin-links again src/package.json: add test-on-windows script another try with test-on-windows, without using bin-links use bin-links on windows Revert "use bin-links on windows" This reverts commit f50ec2a9fabe3098d48e8f412b73c01edbe2140e. invoke mocha binary on windows run npm i once on windows, to make bin files available - why? remove supertest on windows production builds add symlink for mocha debug Revert "debug" This reverts commit 8916a0515ca2897c57ca65fef49fd0b3610d2989. Revert "add symlink for mocha" This reverts commit 3c60bef77d2a120d24fce14421fe638598cd849d. windows workflow: adapt cypress path frontend admin tests
This commit is contained in:
parent
13330c45f8
commit
9089b8b973
24 changed files with 22225 additions and 2648 deletions
52
.github/workflows/backend-tests.yml
vendored
52
.github/workflows/backend-tests.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
sudo apt update
|
||||
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Run the backend tests
|
||||
|
@ -74,12 +74,13 @@ jobs:
|
|||
sudo add-apt-repository -y ppa:libreoffice/ppa
|
||||
sudo apt update
|
||||
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
||||
-
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
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
|
||||
npm install
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
@ -93,18 +94,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/installDeps.sh
|
||||
-
|
||||
name: Run the backend tests
|
||||
run: cd src && npm test
|
||||
|
@ -130,8 +119,11 @@ jobs:
|
|||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
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
|
||||
-
|
||||
name: Fix up the settings.json
|
||||
run: |
|
||||
|
@ -139,7 +131,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 && npm run test-on-windows
|
||||
|
||||
withpluginsWindows:
|
||||
# run on pushes to any branch
|
||||
|
@ -162,12 +154,16 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
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
|
||||
-
|
||||
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
|
||||
npm install
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
@ -181,18 +177,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
|
||||
-
|
||||
name: Fix up the settings.json
|
||||
run: |
|
||||
|
@ -200,4 +184,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 && npm run test-on-windows
|
||||
|
|
20
.github/workflows/frontend-admin-tests.yml
vendored
20
.github/workflows/frontend-admin-tests.yml
vendored
|
@ -46,23 +46,11 @@ jobs:
|
|||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install etherpad plugins
|
||||
# We intentionally install an old ep_align version to test upgrades to
|
||||
# the minor version number. 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 ep_align@0.2.27
|
||||
# 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
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Install etherpad plugins
|
||||
run: npm install ep_align@0.2.27
|
||||
-
|
||||
name: Install etherpad plugins
|
||||
run: rm -Rf node_modules/ep_align/static/tests/*
|
||||
|
|
21
.github/workflows/frontend-tests.yml
vendored
21
.github/workflows/frontend-tests.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: export GIT_HASH to env
|
||||
|
@ -103,12 +103,13 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
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
|
||||
npm install
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
@ -123,18 +124,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.20.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: export GIT_HASH to env
|
||||
id: environment
|
||||
|
|
4
.github/workflows/lint-package-lock.yml
vendored
4
.github/workflows/lint-package-lock.yml
vendored
|
@ -38,4 +38,6 @@ jobs:
|
|||
--allowed-hosts npm
|
||||
--allowed-schemes https:
|
||||
--allowed-schemes github:
|
||||
--allowed-urls github:mapbox/node-sqlite3#593c9d498be2510d286349134537e3bf89401c4a
|
||||
--allowed-schemes git+ssh:
|
||||
--allowed-schemes file:
|
||||
--allowed-urls git+ssh://git@github.com/mapbox/node-sqlite3.git#593c9d498be2510d286349134537e3bf89401c4a
|
||||
|
|
23
.github/workflows/load-test.yml
vendored
23
.github/workflows/load-test.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
|||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Install etherpad-load-test
|
||||
|
@ -57,15 +57,16 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Install etherpad-load-test
|
||||
run: sudo npm install -g etherpad-load-test
|
||||
-
|
||||
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
|
||||
npm install
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
@ -78,18 +79,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/installDeps.sh
|
||||
-
|
||||
name: Run load test
|
||||
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
|
||||
|
@ -115,7 +104,7 @@ jobs:
|
|||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Install etherpad-load-test
|
||||
|
|
|
@ -33,12 +33,12 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
# FIXME after 1.9.2
|
||||
# After 1.9.2 is released, we need to remove '--legacy-peer-deps --no-save'
|
||||
-
|
||||
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
|
||||
npm install --legacy-peer-deps --no-save
|
||||
ep_align
|
||||
ep_author_hover
|
||||
ep_cursortrace
|
||||
|
@ -52,15 +52,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/installDeps.sh
|
||||
|
@ -83,17 +74,37 @@ jobs:
|
|||
# commit that merges the PR's source branch to its destination branch.
|
||||
run: git checkout "${GITHUB_SHA}"
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
name: Temporary remove ./node_modules; Remove this after 1.9.2 release
|
||||
run: rm -rf ./node_modules
|
||||
-
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Install Etherpad plugins again; Remove this after 1.9.2 release
|
||||
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
|
||||
-
|
||||
name: Run the backend tests
|
||||
run: cd src && npm test
|
||||
-
|
||||
name: Install Cypress
|
||||
run: cd src && npm install cypress
|
||||
run: npm install cypress
|
||||
-
|
||||
name: Run Etherpad & Test Frontend
|
||||
run: |
|
||||
node src/node/server.js &
|
||||
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
||||
./src/node_modules/cypress/bin/cypress run --config-file src/tests/frontend/cypress/cypress.config.js
|
||||
./node_modules/cypress/bin/cypress run --config-file src/tests/frontend/cypress/cypress.config.js
|
||||
|
|
11
.github/workflows/windows.yml
vendored
11
.github/workflows/windows.yml
vendored
|
@ -34,13 +34,16 @@ jobs:
|
|||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
name: Install the ep_etherpad-lite package from ./src
|
||||
shell: msys2 {0}
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Run npm i once to make bin files available - why is this needed at all?
|
||||
run: npm i
|
||||
-
|
||||
name: Run the backend tests
|
||||
shell: msys2 {0}
|
||||
run: cd src && npm test
|
||||
run: cd src && npm run test-on-windows
|
||||
-
|
||||
name: Build the .zip
|
||||
shell: msys2 {0}
|
||||
|
@ -115,11 +118,11 @@ jobs:
|
|||
etherpad/src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Install Cypress
|
||||
run: cd etherpad && cd src && npm install cypress
|
||||
run: cd etherpad && npm install cypress
|
||||
-
|
||||
name: Run Etherpad
|
||||
run: |
|
||||
cd etherpad
|
||||
node node_modules\ep_etherpad-lite\node\server.js &
|
||||
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
||||
src\node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
|
||||
node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue