Update backend-tests.yml #251
Workflow file for this run
This file contains 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] | |
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 libreoffice | |
uses: awalsh128/[email protected] | |
with: | |
packages: libreoffice libreoffice-pdfimport | |
version: 1.0 | |
- | |
name: Install etherpad core | |
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 }} | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- | |
name: Install Etherpad core dependencies | |
run: bin/installDeps.sh | |
- | |
name: Run the backend tests | |
run: pnpm run test |