Fixed windows build.

This commit is contained in:
SamTV12345 2024-02-10 16:21:03 +01:00
parent 1538cd344d
commit 7049372f4a
10 changed files with 22 additions and 21 deletions

View file

@ -56,7 +56,7 @@ jobs:
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
- -
name: Run the backend tests name: Run the backend tests
run: cd src && npm test run: cd src && pnpm test
withpluginsLinux: withpluginsLinux:
# run on pushes to any branch # run on pushes to any branch
@ -135,7 +135,7 @@ jobs:
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
- -
name: Run the backend tests name: Run the backend tests
run: cd src && npm test run: cd src && pnpm test
withoutpluginsWindows: withoutpluginsWindows:
# run on pushes to any branch # run on pushes to any branch
@ -181,7 +181,7 @@ jobs:
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json" powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
- -
name: Run the backend tests name: Run the backend tests
run: cd src && npm test run: cd src && pnpm test
withpluginsWindows: withpluginsWindows:
# run on pushes to any branch # run on pushes to any branch
@ -256,4 +256,4 @@ jobs:
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json" powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
- -
name: Run the backend tests name: Run the backend tests
run: cd src && npm test run: cd src && pnpm test

View file

@ -70,7 +70,7 @@ jobs:
*) printf %s\\n "unexpected status: ${status}" >&2; exit 1;; *) printf %s\\n "unexpected status: ${status}" >&2; exit 1;;
esac esac
done done
(cd src && npm run test-container) (cd src && pnpm run test-container)
git clean -dxf . git clean -dxf .
- -
name: Docker meta name: Docker meta

View file

@ -80,7 +80,7 @@ jobs:
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
- -
name: Run the backend tests name: Run the backend tests
run: cd src && npm test run: cd src && pnpm test
# Because actions/checkout@v4 is called with "ref: master" and without # Because actions/checkout@v4 is called with "ref: master" and without
# "fetch-depth: 0", the local clone does not have the ${GITHUB_SHA} # "fetch-depth: 0", the local clone does not have the ${GITHUB_SHA}
# commit. Fetch ${GITHUB_REF} to get the ${GITHUB_SHA} commit. Note that a # commit. Fetch ${GITHUB_REF} to get the ${GITHUB_SHA} commit. Note that a

View file

@ -54,7 +54,7 @@ jobs:
- -
name: Run the backend tests name: Run the backend tests
shell: msys2 {0} shell: msys2 {0}
run: cd src && npm test run: cd src && pnpm test
- -
name: Build the .zip name: Build the .zip
shell: msys2 {0} shell: msys2 {0}

1
.gitignore vendored
View file

@ -22,3 +22,4 @@ out/
/src/bin/etherpad-1.deb /src/bin/etherpad-1.deb
/src/bin/node.exe /src/bin/node.exe
plugin_packages plugin_packages
/pnpm-lock.yaml

View file

@ -64,21 +64,21 @@ jobs:
- *install_libreoffice - *install_libreoffice
- *set_loglevel_warn - *set_loglevel_warn
- "src/bin/installDeps.sh" - "src/bin/installDeps.sh"
- "cd src && npm install && cd -" - "cd src && pnpm install && cd -"
script: script:
- "cd src && npm test" - "cd src && pnpm test"
- name: "Test the Dockerfile" - name: "Test the Dockerfile"
install: install:
- "cd src && npm install && cd -" - "cd src && pnpm install && cd -"
script: script:
- "docker build -t etherpad:test ." - "docker build -t etherpad:test ."
- "docker run -d -p 9001:9001 etherpad:test && sleep 3" - "docker run -d -p 9001:9001 etherpad:test && sleep 3"
- "cd src && npm run test-container" - "cd src && pnpm run test-container"
- name: "Load test Etherpad without Plugins" - name: "Load test Etherpad without Plugins"
install: install:
- *set_loglevel_warn - *set_loglevel_warn
- "src/bin/installDeps.sh" - "src/bin/installDeps.sh"
- "cd src && npm install && cd -" - "cd src && pnpm install && cd -"
- "npm install -g etherpad-load-test" - "npm install -g etherpad-load-test"
script: script:
- "src/tests/frontend/travis/runnerLoadTest.sh" - "src/tests/frontend/travis/runnerLoadTest.sh"
@ -107,16 +107,16 @@ jobs:
- *set_loglevel_warn - *set_loglevel_warn
- "src/bin/installDeps.sh" - "src/bin/installDeps.sh"
- *install_plugins - *install_plugins
- "cd src && npm install && cd -" - "cd src && pnpm install && cd -"
script: script:
- "cd src && npm test" - "cd src && pnpm test"
- name: "Test the Dockerfile" - name: "Test the Dockerfile"
install: install:
- "cd src && npm install && cd -" - "cd src && pnpm install && cd -"
script: script:
- "docker build -t etherpad:test ." - "docker build -t etherpad:test ."
- "docker run -d -p 9001:9001 etherpad:test && sleep 3" - "docker run -d -p 9001:9001 etherpad:test && sleep 3"
- "cd src && npm run test-container" - "cd src && pnpm run test-container"
- name: "Load test Etherpad with Plugins" - name: "Load test Etherpad with Plugins"
install: install:
- *set_loglevel_warn - *set_loglevel_warn

View file

@ -113,7 +113,7 @@ COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json
#RUN chmod -R g=u . #RUN chmod -R g=u .
USER root USER root
RUN cd src && npm link RUN cd src && pnpm link
USER etherpad USER etherpad

View file

@ -33,7 +33,7 @@ try export GIT_WORK_TREE=${TMP_FOLDER}; git checkout HEAD -f \
|| fatal "failed to copy etherpad to temporary folder" || fatal "failed to copy etherpad to temporary folder"
try mkdir "${TMP_FOLDER}"/.git try mkdir "${TMP_FOLDER}"/.git
try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD
try cp -r ./src/node_modules "${TMP_FOLDER}"/src/node_modules try pnpm i "${TMP_FOLDER}"/src/node_modules
try cd "${TMP_FOLDER}" try cd "${TMP_FOLDER}"
[ -f src/package.json ] || fatal "failed to copy etherpad to temporary folder" [ -f src/package.json ] || fatal "failed to copy etherpad to temporary folder"

View file

@ -25,7 +25,7 @@ TODO
To run the backend tests, run the following from the Etherpad working directory: To run the backend tests, run the following from the Etherpad working directory:
```shell ```shell
(cd src && npm test) (cd src && pnpm test)
``` ```
To run the frontend tests, visit: http://localhost:9001/tests/frontend/ To run the frontend tests, visit: http://localhost:9001/tests/frontend/

View file

@ -72,4 +72,4 @@ jobs:
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
- -
name: Run the backend tests name: Run the backend tests
run: cd src && npm test run: cd src && pnpm test