Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,71 @@ jobs:

diff -u /tmp/latest.txt /tmp/actual.txt

EtherpadDockerWithPlugins:
name: Docker [${{ matrix.versions.tag }}] with plugins
runs-on: ubuntu-latest

strategy:
matrix:
versions: [
{ tag: "2.7.2" },
{ tag: "2.6.1" },
{ tag: "2.5.0" },
]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Start docker containers
run: |
EP_VERSION=${{ matrix.versions.tag }} docker compose -f ./tests/e2e/docker/docker-compose.plugins.yml up -d --wait

- name: Dump docker compose logs on failure
if: failure()
run: |
docker compose -f ./tests/e2e/docker/docker-compose.plugins.yml logs --no-color --timestamps

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Scan etherpad instance
run: |
set -euo pipefail
output="$(bin/console.php ether:scan http://localhost:9001)"
echo "$output"

expected="Package version: ${{ matrix.versions.tag }}"
if ! grep -Fq "$expected" <<< "$output"; then
echo "Assertion failed: expected output to contain: $expected"
exit 1
fi

expectedPackages=(
"ep_align"
"ep_headings2"
"ep_font_color"
"ep_adminpads2"
"ep_comments_page"
"ep_font_size"
"ep_markdown"
)
for pkg in "${expectedPackages[@]}"; do
if ! grep -Fq "* $pkg" <<< "$output"; then
echo "Assertion failed: expected output to contain: * $pkg"
exit 1
fi
done

EtherpadDifferentVersion:
name: Docker [${{ matrix.versions.tag }}]
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion src/Service/ApiVersionLookupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ApiVersionLookupService
'1.2.13' => ['1.6.0', '1.8.0'],
'1.2.14' => ['1.8.1', '1.8.5'],
'1.2.15' =>['1.8.6', '1.8.18'],
'1.3.0' => ['1.9.0', null],
'1.3.0' => ['1.9.0', '2.7.2'],
'1.3.1' => ['2.7.3', null],
];

public function getEtherpadVersionRange(string $apiVersion): ?VersionRange
Expand Down
6 changes: 6 additions & 0 deletions tests/e2e/docker/docker-compose.plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
etherpad:
image: etherpad/etherpad:$EP_VERSION
command: ["sh", "-c", "pnpm run plugins i ep_align ep_headings2 ep_font_color ep_adminpads2 ep_comments_page ep_font_size ep_markdown && pnpm run prod"]
ports:
- 9001:9001
2 changes: 1 addition & 1 deletion tests/e2e/fixture/latest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Starting scan of api: http://localhost:9001/

[INFO] No revision in server header

[INFO] api version: 1.3.0
[INFO] api version: 1.3.1

Starting scan of a pad...
=========================
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/fixture/master_with_plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Starting scan of api: http://localhost:9001/

[INFO] No revision in server header

[INFO] api version: 1.3.0
[INFO] api version: 1.3.1

Starting scan of a pad...
=========================
Expand Down
Loading