ci: drop obsolete 'pnpm config set auto-install-peers false' (rejecte… #475
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Backend tests" | |
| # any branch is useful for testing before a PR is submitted | |
| on: [push, pull_request] | |
| env: | |
| PNPM_HOME: ~/.pnpm-store | |
| jobs: | |
| withplugins: | |
| # run on pushes to any branch | |
| # run on PRs from external forks | |
| if: | | |
| (github.event_name != 'pull_request') | |
| || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) | |
| name: with Plugins | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Install etherpad core | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ether/etherpad-lite | |
| path: ./etherpad | |
| - | |
| name: Checkout plugin repository | |
| uses: actions/checkout@v6 | |
| with: | |
| path: ./plugin | |
| - uses: actions/cache@v5 | |
| name: Cache pnpm store | |
| with: | |
| path: ${{ env.PNPM_HOME }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - uses: pnpm/action-setup@v6 | |
| name: Install pnpm | |
| with: | |
| version: 11 | |
| run_install: false | |
| - | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - | |
| name: Prepare Etherpad core | |
| run: | | |
| cd ./etherpad | |
| ./bin/installDeps.sh | |
| pnpm link --global . | |
| - | |
| name: Prepare plugin | |
| run: | | |
| cd ./plugin | |
| PLUGIN_NAME=$(npx -c 'printf %s\\n "${npm_package_name}"') || exit 1 | |
| echo "PLUGIN_NAME=$PLUGIN_NAME" >> $GITHUB_ENV | |
| pnpm install | |
| pnpm build | |
| pnpm link --global . | |
| - name: Link plugin to Etherpad | |
| run: | | |
| cd ./etherpad/src | |
| pnpm link --global "$PLUGIN_NAME" | |
| - | |
| name: Remove core tests so only the client is tested | |
| run: rm -rf ./etherpad/src/tests/backend/specs | |
| - | |
| name: Run the backend tests | |
| run: | | |
| cd ./etherpad/src | |
| pnpm --filter ep_etherpad-lite exec cross-env NODE_ENV=production mocha --import=tsx --timeout 120000 --recursive tests/backend/specs/**.ts ../node_modules/ep_*/static/tests/backend/specs/** ../node_modules/$PLUGIN_NAME/static/tests/backend/specs/** |