2021-04-20 18:19:32 +02:00
|
|
|
name: "Upgrade from latest release"
|
2021-03-05 07:38:50 +01:00
|
|
|
|
|
|
|
# any branch is useful for testing before a PR is submitted
|
2024-03-23 22:10:21 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "doc/**"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "doc/**"
|
2021-03-05 07:38:50 +01:00
|
|
|
|
2022-04-26 03:08:54 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-03-05 07:38:50 +01:00
|
|
|
jobs:
|
|
|
|
withpluginsLinux:
|
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 07:33:52 +01:00
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2021-03-05 07:38:50 +01:00
|
|
|
name: Linux with Plugins
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-06-03 22:32:06 +02:00
|
|
|
node: [18, 20, 22]
|
2021-03-05 07:38:50 +01:00
|
|
|
steps:
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Check out latest release
|
2023-09-04 18:51:22 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
2024-06-03 22:32:06 +02:00
|
|
|
ref: develop #FIXME change to master when doing release
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2023-10-25 19:08:24 +02:00
|
|
|
uses: actions/setup-node@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
2024-05-09 19:06:14 +02:00
|
|
|
- uses: pnpm/action-setup@v4
|
2024-03-17 19:37:41 +01:00
|
|
|
name: Install pnpm
|
|
|
|
with:
|
2024-04-24 19:08:48 +02:00
|
|
|
version: 9.0.4
|
2024-03-17 19:37:41 +01:00
|
|
|
run_install: false
|
|
|
|
- name: Only install direct dependencies
|
|
|
|
run: pnpm config set auto-install-peers false
|
|
|
|
- name: Install libreoffice
|
2025-01-10 16:38:18 +01:00
|
|
|
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
|
2024-03-17 19:37:41 +01:00
|
|
|
with:
|
|
|
|
packages: libreoffice libreoffice-pdfimport
|
|
|
|
version: 1.0
|
|
|
|
- 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: Only install direct dependencies
|
|
|
|
run: pnpm config set auto-install-peers false
|
|
|
|
-
|
|
|
|
name: Install libreoffice
|
2025-01-10 16:38:18 +01:00
|
|
|
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
|
2024-03-17 19:37:41 +01:00
|
|
|
with:
|
|
|
|
packages: libreoffice libreoffice-pdfimport
|
|
|
|
version: 1.0
|
|
|
|
-
|
|
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
|
|
run: bin/installDeps.sh
|
|
|
|
- name: Install admin ui
|
|
|
|
working-directory: admin
|
|
|
|
run: pnpm install
|
|
|
|
- name: Build admin ui
|
|
|
|
working-directory: admin
|
|
|
|
run: pnpm build
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Install Etherpad plugins
|
|
|
|
run: >
|
2024-06-01 11:39:27 +02:00
|
|
|
pnpm run install-plugins
|
2022-01-28 07:33:52 +01:00
|
|
|
ep_align
|
|
|
|
ep_author_hover
|
|
|
|
ep_cursortrace
|
|
|
|
ep_font_size
|
|
|
|
ep_hash_auth
|
|
|
|
ep_headings2
|
|
|
|
ep_markdown
|
|
|
|
ep_readonly_guest
|
|
|
|
ep_set_title_on_pad
|
|
|
|
ep_spellcheck
|
|
|
|
ep_subscript_and_superscript
|
|
|
|
ep_table_of_contents
|
|
|
|
-
|
|
|
|
name: Run the backend tests
|
2024-03-17 19:37:41 +01:00
|
|
|
run: pnpm run test
|
|
|
|
-
|
|
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
|
|
|
run: ./bin/installDeps.sh
|
2023-09-04 18:51:22 +02:00
|
|
|
# Because actions/checkout@v4 is called with "ref: master" and without
|
2022-01-28 07:33:52 +01:00
|
|
|
# "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
|
|
|
|
# plain "git fetch" only fetches "normal" references (refs/heads/* and
|
|
|
|
# refs/tags/*), and for pull requests none of the normal references
|
|
|
|
# include ${GITHUB_SHA}, so we have to explicitly tell Git to fetch
|
|
|
|
# ${GITHUB_REF}.
|
|
|
|
-
|
|
|
|
name: Fetch the new Git commits
|
|
|
|
run: git fetch --depth=1 origin "${GITHUB_REF}"
|
|
|
|
-
|
|
|
|
name: Upgrade to the new Git revision
|
|
|
|
# For pull requests, ${GITHUB_SHA} is the automatically generated merge
|
|
|
|
# commit that merges the PR's source branch to its destination branch.
|
|
|
|
run: git checkout "${GITHUB_SHA}"
|
2024-03-17 21:55:27 +01:00
|
|
|
- name: Run the backend tests
|
|
|
|
run: pnpm run test
|