Removed all notes of npm in workflow files.

This commit is contained in:
SamTV12345 2023-10-02 19:29:32 +02:00
parent 8be2dffc37
commit 9247f9da74
No known key found for this signature in database
GPG key ID: E63EEC7466038043
10 changed files with 43 additions and 92 deletions

View file

@ -138,7 +138,7 @@ jobs:
- -
name: Install Etherpad plugins name: Install Etherpad plugins
run: > run: >
bun install --no-save cd src && bun install --no-save
ep_align ep_align
ep_author_hover ep_author_hover
ep_cursortrace ep_cursortrace

View file

@ -35,14 +35,9 @@ jobs:
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- -
name: Set up Node.js uses: oven-sh/setup-bun@v1
uses: actions/setup-node@v3
with: with:
node-version: 'lts/*' bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Test name: Test
run: | run: |
@ -58,7 +53,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 && bun run test-container)
git clean -dxf . git clean -dxf .
- -
name: Docker meta name: Docker meta

View file

@ -29,19 +29,15 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: ${{ matrix.node }} bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install etherpad plugins name: Install etherpad plugins
# We intentionally install an old ep_align version to test upgrades to # We intentionally install an old ep_align version to test upgrades to
# the minor version number. The --legacy-peer-deps flag is required 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 # 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 run: bun install ep_align@0.2.27
# Etherpad core dependencies must be installed after installing the # Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common # plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them # dependencies by removing them from src/node_modules and installing them

View file

@ -23,13 +23,9 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install all dependencies and symlink for ep_etherpad-lite name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
@ -78,19 +74,15 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install Etherpad plugins name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7: # The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199 # https://github.com/npm/cli/issues/2199
run: > run: >
npm install --no-save --legacy-peer-deps bun install --no-save --legacy-peer-deps
ep_align ep_align
ep_author_hover ep_author_hover
ep_cursortrace ep_cursortrace

View file

@ -20,16 +20,12 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install lockfile-lint name: Install lockfile-lint
run: npm install --no-save lockfile-lint run: bun install --no-save lockfile-lint
- -
name: Run lockfile-lint on package-lock.json name: Run lockfile-lint on package-lock.json
run: > run: >

View file

@ -20,19 +20,15 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install all dependencies and symlink for ep_etherpad-lite name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
- -
name: Install etherpad-load-test name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test run: sudo bun install -g etherpad-load-test
- -
name: Run load test name: Run load test
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50 run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
@ -50,22 +46,18 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install etherpad-load-test name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test run: sudo bun install -g etherpad-load-test
- -
name: Install etherpad plugins name: Install etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7: # The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199 # https://github.com/npm/cli/issues/2199
run: > run: >
npm install --no-save --legacy-peer-deps bun install --no-save --legacy-peer-deps
ep_align ep_align
ep_author_hover ep_author_hover
ep_cursortrace ep_cursortrace
@ -107,19 +99,15 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install all dependencies and symlink for ep_etherpad-lite name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh run: src/bin/installDeps.sh
- -
name: Install etherpad-load-test name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test run: sudo bun install -g etherpad-load-test
- -
name: Run load test name: Run load test
run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5 run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5

View file

@ -20,13 +20,9 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: docker network name: docker network
run: docker network create --subnet=172.23.42.0/16 ep_net run: docker network create --subnet=172.23.42.0/16 ep_net

View file

@ -18,7 +18,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: [16, 18, 20] node: [1.0.3, canary]
steps: steps:
- -
name: Check out latest release name: Check out latest release
@ -26,19 +26,15 @@ jobs:
with: with:
ref: master ref: master
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: ${{ matrix.node }} bun-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install Etherpad plugins name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm # The --legacy-peer-deps flag is required to work around a bug in npm
# v7: https://github.com/npm/cli/issues/2199 # v7: https://github.com/npm/cli/issues/2199
run: > run: >
npm install --no-save --legacy-peer-deps bun install
ep_align ep_align
ep_author_hover ep_author_hover
ep_cursortrace ep_cursortrace
@ -66,7 +62,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 && bun run 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
@ -87,10 +83,10 @@ 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 && bun run test
- -
name: Install Cypress name: Install Cypress
run: cd src && npm install cypress run: cd src && bun install cypress
- -
name: Run Etherpad & Test Frontend name: Run Etherpad & Test Frontend
run: | run: |

View file

@ -26,13 +26,9 @@ jobs:
name: Checkout repository name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
- -
name: Install all dependencies and symlink for ep_etherpad-lite name: Install all dependencies and symlink for ep_etherpad-lite
shell: msys2 {0} shell: msys2 {0}
@ -40,7 +36,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 && bun run test
- -
name: Build the .zip name: Build the .zip
shell: msys2 {0} shell: msys2 {0}
@ -106,16 +102,12 @@ jobs:
name: Extract Etherpad name: Extract Etherpad
run: 7z x etherpad-win.zip -oetherpad run: 7z x etherpad-win.zip -oetherpad
- -
uses: actions/setup-node@v3 uses: oven-sh/setup-bun@v1
with: with:
node-version: 20 bun-version: latest
cache: 'npm'
cache-dependency-path: |
etherpad/src/package-lock.json
etherpad/src/bin/doc/package-lock.json
- -
name: Install Cypress name: Install Cypress
run: cd etherpad && cd src && npm install cypress run: cd etherpad && cd src && bun install cypress
- -
name: Run Etherpad name: Run Etherpad
run: | run: |

View file

@ -4,7 +4,7 @@
# #
# Author: muxator # Author: muxator
FROM node:lts-alpine FROM oven/bun:latest
LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite" LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
ARG TIMEZONE= ARG TIMEZONE=
@ -99,7 +99,7 @@ COPY --chown=etherpad:etherpad ./ ./
# seems to confuse tools such as `npm outdated`, `npm update`, and some ESLint # seems to confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules. # rules.
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \ RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
npm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \ bun install ${ETHERPAD_PLUGINS}; } && \
src/bin/installDeps.sh && \ src/bin/installDeps.sh && \
rm -rf ~/.npm rm -rf ~/.npm
@ -110,7 +110,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 && bun link
USER etherpad USER etherpad
HEALTHCHECK --interval=20s --timeout=3s CMD ["etherpad-healthcheck"] HEALTHCHECK --interval=20s --timeout=3s CMD ["etherpad-healthcheck"]