From d2ce3e3de094145a3ff2df4abf79d686b4b91d13 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sat, 16 Mar 2024 12:11:52 +0100 Subject: [PATCH] Use Fixed backend test. --- .github/workflows/backend-tests.yml | 42 +++++++++++++++++----------- .github/workflows/frontend-tests.yml | 4 +-- .github/workflows/npmpublish.yml | 4 +-- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index b558d2d..1ce57c0 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -24,23 +24,7 @@ jobs: uses: actions/checkout@v3 with: repository: ether/etherpad-lite - - - name: Checkout plugin repository - uses: actions/checkout@v3 - with: - path: ./node_modules/__tmp - - - name: Determine plugin name - id: plugin_name - run: | - cd ./node_modules/__tmp - npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"' - - - name: Rename plugin directory - run: | - mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}" - env: - PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }} + path: etherpad-lite - uses: pnpm/action-setup@v3 name: Install pnpm with: @@ -57,6 +41,30 @@ jobs: key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- + - + name: Checkout plugin repository + uses: actions/checkout@v3 + with: + path: plugin + - + name: Determine plugin name + id: plugin_name + run: | + cd ./plugin + echo "::set-output name=plugin_name::$(node -p "require('./package.json').name")" + - + name: Rename plugin directory + run: | + pnpm link --global + env: + PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }} + - name: Link plugin to etherpad-lite + working-directory: ./etherpad-lite + run: | + pnpm link --global $PLUGIN_NAME + - name: Remove tests + working-directory: ./etherpad-lite + run: rm -rf ./src/tests - name: Install Etherpad core dependencies run: bin/installDeps.sh diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index c592d29..1f88699 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -17,8 +17,8 @@ jobs: - uses: pnpm/action-setup@v3 name: Install pnpm with: - version: 8 - run_install: false + version: 8 + run_install: false - name: Get pnpm store directory shell: bash run: | diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 62bda6e..98f8adb 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -36,8 +36,8 @@ jobs: - uses: pnpm/action-setup@v3 name: Install pnpm with: - version: 8 - run_install: false + version: 8 + run_install: false - name: Get pnpm store directory shell: bash run: |