mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 06:03:34 +01:00
ci: Synchronize GitHub workflows with develop
branch
This commit is contained in:
parent
d97537d18b
commit
c85ab49444
12 changed files with 832 additions and 686 deletions
289
.github/workflows/backend-tests.yml
vendored
289
.github/workflows/backend-tests.yml
vendored
|
@ -8,174 +8,193 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Linux without plugins
|
name: Linux without plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node: [12, 14, 16]
|
node: [12, 14, 16]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: ${{ matrix.node }}
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
- name: Install libreoffice
|
cache: 'npm'
|
||||||
run: |
|
cache-dependency-path: |
|
||||||
sudo add-apt-repository -y ppa:libreoffice/ppa
|
src/package-lock.json
|
||||||
sudo apt update
|
src/bin/doc/package-lock.json
|
||||||
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
-
|
||||||
|
name: Install libreoffice
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
run: |
|
||||||
run: src/bin/installDeps.sh
|
sudo add-apt-repository -y ppa:libreoffice/ppa
|
||||||
|
sudo apt update
|
||||||
- name: Run the backend tests
|
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
||||||
run: cd src && npm test
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
|
-
|
||||||
|
name: Run the backend tests
|
||||||
|
run: cd src && npm test
|
||||||
|
|
||||||
withpluginsLinux:
|
withpluginsLinux:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Linux with Plugins
|
name: Linux with Plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node: [12, 14, 16]
|
node: [12, 14, 16]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: ${{ matrix.node }}
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
- name: Install libreoffice
|
cache: 'npm'
|
||||||
run: |
|
cache-dependency-path: |
|
||||||
sudo add-apt-repository -y ppa:libreoffice/ppa
|
src/package-lock.json
|
||||||
sudo apt update
|
src/bin/doc/package-lock.json
|
||||||
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
-
|
||||||
|
name: Install libreoffice
|
||||||
- name: Install Etherpad plugins
|
run: |
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
sudo add-apt-repository -y ppa:libreoffice/ppa
|
||||||
# https://github.com/npm/cli/issues/2199
|
sudo apt update
|
||||||
run: >
|
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
||||||
npm install --no-save --legacy-peer-deps
|
-
|
||||||
ep_align
|
name: Install Etherpad plugins
|
||||||
ep_author_hover
|
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
||||||
ep_cursortrace
|
# https://github.com/npm/cli/issues/2199
|
||||||
ep_font_size
|
run: >
|
||||||
ep_hash_auth
|
npm install --no-save --legacy-peer-deps
|
||||||
ep_headings2
|
ep_align
|
||||||
ep_image_upload
|
ep_author_hover
|
||||||
ep_markdown
|
ep_cursortrace
|
||||||
ep_readonly_guest
|
ep_font_size
|
||||||
ep_set_title_on_pad
|
ep_hash_auth
|
||||||
ep_spellcheck
|
ep_headings2
|
||||||
ep_subscript_and_superscript
|
ep_image_upload
|
||||||
ep_table_of_contents
|
ep_markdown
|
||||||
|
ep_readonly_guest
|
||||||
# This must be run after installing the plugins, otherwise npm will try to
|
ep_set_title_on_pad
|
||||||
# hoist common dependencies by removing them from src/node_modules and
|
ep_spellcheck
|
||||||
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
ep_subscript_and_superscript
|
||||||
# logic appears to be buggy, because it sometimes removes dependencies from
|
ep_table_of_contents
|
||||||
# src/node_modules but fails to add them to the top-level node_modules. Even
|
# Etherpad core dependencies must be installed after installing the
|
||||||
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
# plugin's dependencies, otherwise npm will try to hoist common
|
||||||
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
# dependencies by removing them from src/node_modules and installing them
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
||||||
run: src/bin/installDeps.sh
|
# to be buggy, because it sometimes removes dependencies from
|
||||||
|
# src/node_modules but fails to add them to the top-level node_modules.
|
||||||
- name: Run the backend tests
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
||||||
run: cd src && npm test
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
||||||
|
# rules.
|
||||||
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
|
-
|
||||||
|
name: Run the backend tests
|
||||||
|
run: cd src && npm test
|
||||||
|
|
||||||
withoutpluginsWindows:
|
withoutpluginsWindows:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Windows without plugins
|
name: Windows without plugins
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
cache: 'npm'
|
||||||
run: src/bin/installOnWindows.bat
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- name: Fix up the settings.json
|
src/bin/doc/package-lock.json
|
||||||
run: |
|
-
|
||||||
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
run: src/bin/installOnWindows.bat
|
||||||
|
-
|
||||||
- name: Run the backend tests
|
name: Fix up the settings.json
|
||||||
run: cd src && npm test
|
run: |
|
||||||
|
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
||||||
|
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
||||||
|
-
|
||||||
|
name: Run the backend tests
|
||||||
|
run: cd src && npm test
|
||||||
|
|
||||||
withpluginsWindows:
|
withpluginsWindows:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Windows with Plugins
|
name: Windows with Plugins
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install Etherpad plugins
|
cache: 'npm'
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
cache-dependency-path: |
|
||||||
# https://github.com/npm/cli/issues/2199
|
src/package-lock.json
|
||||||
run: >
|
src/bin/doc/package-lock.json
|
||||||
npm install --no-save --legacy-peer-deps
|
-
|
||||||
ep_align
|
name: Install Etherpad plugins
|
||||||
ep_author_hover
|
# The --legacy-peer-deps flag is required to work around a bug in npm
|
||||||
ep_cursortrace
|
# v7: https://github.com/npm/cli/issues/2199
|
||||||
ep_font_size
|
run: >
|
||||||
ep_hash_auth
|
npm install --no-save --legacy-peer-deps
|
||||||
ep_headings2
|
ep_align
|
||||||
ep_image_upload
|
ep_author_hover
|
||||||
ep_markdown
|
ep_cursortrace
|
||||||
ep_readonly_guest
|
ep_font_size
|
||||||
ep_set_title_on_pad
|
ep_hash_auth
|
||||||
ep_spellcheck
|
ep_headings2
|
||||||
ep_subscript_and_superscript
|
ep_image_upload
|
||||||
ep_table_of_contents
|
ep_markdown
|
||||||
|
ep_readonly_guest
|
||||||
# This must be run after installing the plugins, otherwise npm will try to
|
ep_set_title_on_pad
|
||||||
# hoist common dependencies by removing them from src/node_modules and
|
ep_spellcheck
|
||||||
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
ep_subscript_and_superscript
|
||||||
# logic appears to be buggy, because it sometimes removes dependencies from
|
ep_table_of_contents
|
||||||
# src/node_modules but fails to add them to the top-level node_modules. Even
|
# Etherpad core dependencies must be installed after installing the
|
||||||
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
# plugin's dependencies, otherwise npm will try to hoist common
|
||||||
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
# dependencies by removing them from src/node_modules and installing them
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
||||||
run: src/bin/installOnWindows.bat
|
# to be buggy, because it sometimes removes dependencies from
|
||||||
|
# src/node_modules but fails to add them to the top-level node_modules.
|
||||||
- name: Fix up the settings.json
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
||||||
run: |
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
||||||
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
# rules.
|
||||||
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
- name: Run the backend tests
|
run: src/bin/installOnWindows.bat
|
||||||
run: cd src && npm test
|
-
|
||||||
|
name: Fix up the settings.json
|
||||||
|
run: |
|
||||||
|
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
|
||||||
|
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
|
||||||
|
-
|
||||||
|
name: Run the backend tests
|
||||||
|
run: cd src && npm test
|
||||||
|
|
59
.github/workflows/codeql-analysis.yml
vendored
59
.github/workflows/codeql-analysis.yml
vendored
|
@ -13,42 +13,25 @@ jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
with:
|
uses: actions/checkout@v2
|
||||||
# We must fetch at least the immediate parents so that if this is
|
with:
|
||||||
# a pull request then we can checkout the head.
|
# We must fetch at least the immediate parents so that if this is
|
||||||
fetch-depth: 2
|
# a pull request then we can checkout the head.
|
||||||
|
fetch-depth: 2
|
||||||
# If this run was triggered by a pull request event, then checkout
|
# If this run was triggered by a pull request event, then checkout
|
||||||
# the head of the pull request instead of the merge commit.
|
# the head of the pull request instead of the merge commit.
|
||||||
- run: git checkout HEAD^2
|
-
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
run: git checkout HEAD^2
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
# Initializes the CodeQL tools for scanning.
|
-
|
||||||
- name: Initialize CodeQL
|
name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
-
|
||||||
# with:
|
name: Autobuild
|
||||||
# languages: go, javascript, csharp, python, cpp, java
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
-
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
name: Perform CodeQL Analysis
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
uses: github/codeql-action/analyze@v1
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v1
|
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
|
||||||
# 📚 https://git.io/JvXDl
|
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
||||||
# and modify them (or add more) to build your code if your project
|
|
||||||
# uses a compiled language
|
|
||||||
|
|
||||||
#- run: |
|
|
||||||
# make bootstrap
|
|
||||||
# make release
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v1
|
|
||||||
|
|
74
.github/workflows/docker.yml
vendored
Normal file
74
.github/workflows/docker.yml
vendored
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
name: Docker
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'develop'
|
||||||
|
tags:
|
||||||
|
- 'v?[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
env:
|
||||||
|
TEST_TAG: etherpad/etherpad:test
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Check out
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Build and export to Docker
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
load: true
|
||||||
|
tags: ${{ env.TEST_TAG }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
-
|
||||||
|
name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 'lts/*'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
-
|
||||||
|
name: Test
|
||||||
|
run: |
|
||||||
|
docker run --rm -d -p 9001:9001 ${{ env.TEST_TAG }}
|
||||||
|
./src/bin/installDeps.sh
|
||||||
|
sleep 3
|
||||||
|
(cd src && npm run test-container)
|
||||||
|
git clean -dxf .
|
||||||
|
-
|
||||||
|
name: Docker meta
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
images: etherpad/etherpad
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
-
|
||||||
|
name: Log in to Docker Hub
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
26
.github/workflows/dockerfile.yml
vendored
26
.github/workflows/dockerfile.yml
vendored
|
@ -1,26 +0,0 @@
|
||||||
name: "Dockerfile"
|
|
||||||
|
|
||||||
# any branch is useful for testing before a PR is submitted
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dockerfile:
|
|
||||||
# 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: build image and run connectivity test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: docker build
|
|
||||||
run: |
|
|
||||||
docker build -t etherpad:test .
|
|
||||||
docker run -d -p 9001:9001 etherpad:test
|
|
||||||
./src/bin/installDeps.sh
|
|
||||||
sleep 3 # delay for startup?
|
|
||||||
cd src && npm run test-container
|
|
147
.github/workflows/frontend-admin-tests.yml
vendored
147
.github/workflows/frontend-admin-tests.yml
vendored
|
@ -14,68 +14,85 @@ jobs:
|
||||||
node: [12, 14, 16]
|
node: [12, 14, 16]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate Sauce Labs strings
|
-
|
||||||
id: sauce_strings
|
name: Fail if Dependabot
|
||||||
run: |
|
if: github.actor == 'dependabot[bot]'
|
||||||
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }} - Node ${{ matrix.node }}'
|
run: |
|
||||||
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}-node${{ matrix.node }}'
|
cat <<EOF >&2
|
||||||
|
Frontend tests skipped because Dependabot can't access secrets.
|
||||||
- name: Checkout repository
|
Manually re-run the jobs to run the frontend tests.
|
||||||
uses: actions/checkout@v2
|
For more information, see:
|
||||||
|
https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
|
||||||
- uses: actions/setup-node@v2
|
EOF
|
||||||
with:
|
exit 1
|
||||||
node-version: ${{ matrix.node }}
|
-
|
||||||
|
name: Generate Sauce Labs strings
|
||||||
- name: Install etherpad plugins
|
id: sauce_strings
|
||||||
# We intentionally install an old ep_align version to test upgrades to the minor version number.
|
run: |
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }} - Node ${{ matrix.node }}'
|
||||||
# https://github.com/npm/cli/issues/2199
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}-node${{ matrix.node }}'
|
||||||
run: npm install --no-save --legacy-peer-deps ep_align@0.2.27
|
-
|
||||||
|
name: Checkout repository
|
||||||
# This must be run after installing the plugins, otherwise npm will try to
|
uses: actions/checkout@v2
|
||||||
# hoist common dependencies by removing them from src/node_modules and
|
-
|
||||||
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
uses: actions/setup-node@v3
|
||||||
# logic appears to be buggy, because it sometimes removes dependencies from
|
with:
|
||||||
# src/node_modules but fails to add them to the top-level node_modules. Even
|
node-version: ${{ matrix.node }}
|
||||||
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
cache: 'npm'
|
||||||
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
cache-dependency-path: |
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
src/package-lock.json
|
||||||
run: src/bin/installDeps.sh
|
src/bin/doc/package-lock.json
|
||||||
|
-
|
||||||
# Nuke plugin tests
|
name: Install etherpad plugins
|
||||||
- name: Install etherpad plugins
|
# We intentionally install an old ep_align version to test upgrades to
|
||||||
run: rm -Rf node_modules/ep_align/static/tests/*
|
# the minor version number. The --legacy-peer-deps flag is required to
|
||||||
|
# work around a bug in npm v7: https://github.com/npm/cli/issues/2199
|
||||||
- name: export GIT_HASH to env
|
run: npm install --no-save --legacy-peer-deps ep_align@0.2.27
|
||||||
id: environment
|
# Etherpad core dependencies must be installed after installing the
|
||||||
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
# plugin's dependencies, otherwise npm will try to hoist common
|
||||||
|
# dependencies by removing them from src/node_modules and installing them
|
||||||
- name: Create settings.json
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
||||||
run: cp settings.json.template settings.json
|
# to be buggy, because it sometimes removes dependencies from
|
||||||
|
# src/node_modules but fails to add them to the top-level node_modules.
|
||||||
- name: Write custom settings.json that enables the Admin UI tests
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
||||||
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
||||||
|
# rules.
|
||||||
- name: increase maxHttpBufferSize
|
-
|
||||||
run: "sed -i 's/\"maxHttpBufferSize\": 10000/\"maxHttpBufferSize\": 100000/' settings.json"
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
- name: Remove standard frontend test files, so only admin tests are run
|
-
|
||||||
run: mv src/tests/frontend/specs/* /tmp && mv /tmp/admin*.js src/tests/frontend/specs
|
name: Install etherpad plugins
|
||||||
|
run: rm -Rf node_modules/ep_align/static/tests/*
|
||||||
- uses: saucelabs/sauce-connect-action@v1.1.2
|
-
|
||||||
with:
|
name: export GIT_HASH to env
|
||||||
username: ${{ secrets.SAUCE_USERNAME }}
|
id: environment
|
||||||
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
||||||
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
-
|
||||||
|
name: Create settings.json
|
||||||
- name: Run the frontend admin tests
|
run: cp settings.json.template settings.json
|
||||||
shell: bash
|
-
|
||||||
env:
|
name: Write custom settings.json that enables the Admin UI tests
|
||||||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"
|
||||||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
-
|
||||||
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
name: increase maxHttpBufferSize
|
||||||
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
run: "sed -i 's/\"maxHttpBufferSize\": 10000/\"maxHttpBufferSize\": 100000/' settings.json"
|
||||||
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
-
|
||||||
run: |
|
name: Remove standard frontend test files, so only admin tests are run
|
||||||
src/tests/frontend/travis/adminrunner.sh
|
run: mv src/tests/frontend/specs/* /tmp && mv /tmp/admin*.js src/tests/frontend/specs
|
||||||
|
-
|
||||||
|
uses: saucelabs/sauce-connect-action@v2.1.1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
||||||
|
-
|
||||||
|
name: Run the frontend admin tests
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
||||||
|
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
||||||
|
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
||||||
|
run: |
|
||||||
|
src/tests/frontend/travis/adminrunner.sh
|
||||||
|
|
268
.github/workflows/frontend-tests.yml
vendored
268
.github/workflows/frontend-tests.yml
vendored
|
@ -7,128 +7,160 @@ jobs:
|
||||||
withoutplugins:
|
withoutplugins:
|
||||||
name: without plugins
|
name: without plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate Sauce Labs strings
|
-
|
||||||
id: sauce_strings
|
name: Fail if Dependabot
|
||||||
run: |
|
if: github.actor == 'dependabot[bot]'
|
||||||
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
run: |
|
||||||
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
cat <<EOF >&2
|
||||||
|
Frontend tests skipped because Dependabot can't access secrets.
|
||||||
- name: Checkout repository
|
Manually re-run the jobs to run the frontend tests.
|
||||||
uses: actions/checkout@v2
|
For more information, see:
|
||||||
|
https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
|
||||||
- uses: actions/setup-node@v2
|
EOF
|
||||||
with:
|
exit 1
|
||||||
node-version: 12
|
-
|
||||||
|
name: Generate Sauce Labs strings
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
id: sauce_strings
|
||||||
run: src/bin/installDeps.sh
|
run: |
|
||||||
|
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
||||||
- name: export GIT_HASH to env
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
||||||
id: environment
|
-
|
||||||
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- name: Create settings.json
|
-
|
||||||
run: cp settings.json.template settings.json
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
- name: Disable import/export rate limiting
|
node-version: 12
|
||||||
run: |
|
cache: 'npm'
|
||||||
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- uses: saucelabs/sauce-connect-action@v1
|
src/bin/doc/package-lock.json
|
||||||
with:
|
-
|
||||||
username: ${{ secrets.SAUCE_USERNAME }}
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
run: src/bin/installDeps.sh
|
||||||
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
-
|
||||||
|
name: export GIT_HASH to env
|
||||||
- name: Run the frontend tests
|
id: environment
|
||||||
shell: bash
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
||||||
env:
|
-
|
||||||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
name: Create settings.json
|
||||||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
run: cp settings.json.template settings.json
|
||||||
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
-
|
||||||
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
name: Disable import/export rate limiting
|
||||||
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
run: |
|
||||||
run: |
|
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
|
||||||
src/tests/frontend/travis/runner.sh
|
-
|
||||||
|
uses: saucelabs/sauce-connect-action@v2.1.1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
||||||
|
-
|
||||||
|
name: Run the frontend tests
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
||||||
|
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
||||||
|
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
||||||
|
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
||||||
|
run: |
|
||||||
|
src/tests/frontend/travis/runner.sh
|
||||||
|
|
||||||
withplugins:
|
withplugins:
|
||||||
name: with plugins
|
name: with plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate Sauce Labs strings
|
-
|
||||||
id: sauce_strings
|
name: Fail if Dependabot
|
||||||
run: |
|
if: github.actor == 'dependabot[bot]'
|
||||||
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
run: |
|
||||||
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
cat <<EOF >&2
|
||||||
|
Frontend tests skipped because Dependabot can't access secrets.
|
||||||
- name: Checkout repository
|
Manually re-run the jobs to run the frontend tests.
|
||||||
uses: actions/checkout@v2
|
For more information, see:
|
||||||
|
https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
|
||||||
- uses: actions/setup-node@v2
|
EOF
|
||||||
with:
|
exit 1
|
||||||
node-version: 12
|
-
|
||||||
|
name: Generate Sauce Labs strings
|
||||||
- name: Install Etherpad plugins
|
id: sauce_strings
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
run: |
|
||||||
# https://github.com/npm/cli/issues/2199
|
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
|
||||||
run: >
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
||||||
npm install --no-save --legacy-peer-deps
|
-
|
||||||
ep_align
|
name: Checkout repository
|
||||||
ep_author_hover
|
uses: actions/checkout@v2
|
||||||
ep_cursortrace
|
-
|
||||||
ep_embedmedia
|
uses: actions/setup-node@v3
|
||||||
ep_font_size
|
with:
|
||||||
ep_hash_auth
|
node-version: 12
|
||||||
ep_headings2
|
cache: 'npm'
|
||||||
ep_image_upload
|
cache-dependency-path: |
|
||||||
ep_markdown
|
src/package-lock.json
|
||||||
ep_readonly_guest
|
src/bin/doc/package-lock.json
|
||||||
ep_set_title_on_pad
|
-
|
||||||
ep_spellcheck
|
name: Install Etherpad plugins
|
||||||
ep_subscript_and_superscript
|
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
||||||
ep_table_of_contents
|
# https://github.com/npm/cli/issues/2199
|
||||||
|
run: >
|
||||||
# This must be run after installing the plugins, otherwise npm will try to
|
npm install --no-save --legacy-peer-deps
|
||||||
# hoist common dependencies by removing them from src/node_modules and
|
ep_align
|
||||||
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
ep_author_hover
|
||||||
# logic appears to be buggy, because it sometimes removes dependencies from
|
ep_cursortrace
|
||||||
# src/node_modules but fails to add them to the top-level node_modules. Even
|
ep_embedmedia
|
||||||
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
ep_font_size
|
||||||
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
ep_hash_auth
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
ep_headings2
|
||||||
run: src/bin/installDeps.sh
|
ep_image_upload
|
||||||
|
ep_markdown
|
||||||
- name: export GIT_HASH to env
|
ep_readonly_guest
|
||||||
id: environment
|
ep_set_title_on_pad
|
||||||
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
ep_spellcheck
|
||||||
|
ep_subscript_and_superscript
|
||||||
- name: Create settings.json
|
ep_table_of_contents
|
||||||
run: cp settings.json.template settings.json
|
# Etherpad core dependencies must be installed after installing the
|
||||||
|
# plugin's dependencies, otherwise npm will try to hoist common
|
||||||
- name: Disable import/export rate limiting
|
# dependencies by removing them from src/node_modules and installing them
|
||||||
run: |
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
||||||
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
|
# to be buggy, because it sometimes removes dependencies from
|
||||||
|
# src/node_modules but fails to add them to the top-level node_modules.
|
||||||
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
||||||
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
||||||
|
# rules.
|
||||||
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
|
-
|
||||||
|
name: export GIT_HASH to env
|
||||||
|
id: environment
|
||||||
|
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
||||||
|
-
|
||||||
|
name: Create settings.json
|
||||||
|
run: cp settings.json.template settings.json
|
||||||
|
-
|
||||||
|
name: Disable import/export rate limiting
|
||||||
|
run: |
|
||||||
|
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
|
||||||
# XXX we should probably run all tests, because plugins could effect their results
|
# XXX we should probably run all tests, because plugins could effect their results
|
||||||
- name: Remove standard frontend test files, so only plugin tests are run
|
-
|
||||||
run: rm src/tests/frontend/specs/*
|
name: Remove standard frontend test files, so only plugin tests are run
|
||||||
|
run: rm src/tests/frontend/specs/*
|
||||||
- uses: saucelabs/sauce-connect-action@v1
|
-
|
||||||
with:
|
uses: saucelabs/sauce-connect-action@v2.1.1
|
||||||
username: ${{ secrets.SAUCE_USERNAME }}
|
with:
|
||||||
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
username: ${{ secrets.SAUCE_USERNAME }}
|
||||||
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
|
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
||||||
- name: Run the frontend tests
|
-
|
||||||
shell: bash
|
name: Run the frontend tests
|
||||||
env:
|
shell: bash
|
||||||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
env:
|
||||||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
||||||
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
||||||
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
||||||
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
||||||
run: |
|
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
||||||
src/tests/frontend/travis/runner.sh
|
run: |
|
||||||
|
src/tests/frontend/travis/runner.sh
|
||||||
|
|
40
.github/workflows/lint-package-lock.yml
vendored
40
.github/workflows/lint-package-lock.yml
vendored
|
@ -8,21 +8,31 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: package-lock.json
|
name: package-lock.json
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install lockfile-lint
|
cache: 'npm'
|
||||||
run: npm install lockfile-lint
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- name: Run lockfile-lint on package-lock.json
|
src/bin/doc/package-lock.json
|
||||||
run: npx lockfile-lint --path src/package-lock.json --validate-https --allowed-hosts npm
|
-
|
||||||
|
name: Install lockfile-lint
|
||||||
|
run: npm install --no-save lockfile-lint
|
||||||
|
-
|
||||||
|
name: Run lockfile-lint on package-lock.json
|
||||||
|
run: >
|
||||||
|
npx lockfile-lint
|
||||||
|
--path src/package-lock.json
|
||||||
|
--allowed-hosts npm
|
||||||
|
--allowed-schemes https:
|
||||||
|
--allowed-schemes github:
|
||||||
|
--allowed-urls github:mapbox/node-sqlite3#593c9d498be2510d286349134537e3bf89401c4a
|
||||||
|
|
175
.github/workflows/load-test.yml
vendored
175
.github/workflows/load-test.yml
vendored
|
@ -8,104 +8,115 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: without plugins
|
name: without plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
cache: 'npm'
|
||||||
run: src/bin/installDeps.sh
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- name: Install etherpad-load-test
|
src/bin/doc/package-lock.json
|
||||||
run: sudo npm install -g etherpad-load-test
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
- name: Run load test
|
run: src/bin/installDeps.sh
|
||||||
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
|
-
|
||||||
|
name: Install etherpad-load-test
|
||||||
|
run: sudo npm install -g etherpad-load-test
|
||||||
|
-
|
||||||
|
name: Run load test
|
||||||
|
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
|
||||||
|
|
||||||
withplugins:
|
withplugins:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: with Plugins
|
name: with Plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install etherpad-load-test
|
cache: 'npm'
|
||||||
run: sudo npm install -g etherpad-load-test
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- name: Install etherpad plugins
|
src/bin/doc/package-lock.json
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
-
|
||||||
# https://github.com/npm/cli/issues/2199
|
name: Install etherpad-load-test
|
||||||
run: >
|
run: sudo npm install -g etherpad-load-test
|
||||||
npm install --no-save --legacy-peer-deps
|
-
|
||||||
ep_align
|
name: Install etherpad plugins
|
||||||
ep_author_hover
|
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
||||||
ep_cursortrace
|
# https://github.com/npm/cli/issues/2199
|
||||||
ep_font_size
|
run: >
|
||||||
ep_hash_auth
|
npm install --no-save --legacy-peer-deps
|
||||||
ep_headings2
|
ep_align
|
||||||
ep_markdown
|
ep_author_hover
|
||||||
ep_readonly_guest
|
ep_cursortrace
|
||||||
ep_set_title_on_pad
|
ep_font_size
|
||||||
ep_spellcheck
|
ep_hash_auth
|
||||||
ep_subscript_and_superscript
|
ep_headings2
|
||||||
ep_table_of_contents
|
ep_markdown
|
||||||
|
ep_readonly_guest
|
||||||
# This must be run after installing the plugins, otherwise npm will try to
|
ep_set_title_on_pad
|
||||||
# hoist common dependencies by removing them from src/node_modules and
|
ep_spellcheck
|
||||||
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
ep_subscript_and_superscript
|
||||||
# logic appears to be buggy, because it sometimes removes dependencies from
|
ep_table_of_contents
|
||||||
# src/node_modules but fails to add them to the top-level node_modules. Even
|
# Etherpad core dependencies must be installed after installing the
|
||||||
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
# plugin's dependencies, otherwise npm will try to hoist common
|
||||||
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
# dependencies by removing them from src/node_modules and installing them
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
||||||
run: src/bin/installDeps.sh
|
# to be buggy, because it sometimes removes dependencies from
|
||||||
|
# src/node_modules but fails to add them to the top-level node_modules.
|
||||||
# configures some settings and runs npm run test
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
||||||
- name: Run load test
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
||||||
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
|
# rules.
|
||||||
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
|
-
|
||||||
|
name: Run load test
|
||||||
|
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
|
||||||
|
|
||||||
long:
|
long:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: long running
|
name: long running
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
cache: 'npm'
|
||||||
run: src/bin/installDeps.sh
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- name: Install etherpad-load-test
|
src/bin/doc/package-lock.json
|
||||||
run: sudo npm install -g etherpad-load-test
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
# configures some settings and runs npm run test
|
-
|
||||||
- name: Run load test
|
name: Install etherpad-load-test
|
||||||
run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5
|
run: sudo npm install -g etherpad-load-test
|
||||||
|
-
|
||||||
|
name: Run load test
|
||||||
|
run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5
|
||||||
|
|
66
.github/workflows/rate-limit.yml
vendored
66
.github/workflows/rate-limit.yml
vendored
|
@ -8,36 +8,42 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: test
|
name: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: docker network
|
cache: 'npm'
|
||||||
run: docker network create --subnet=172.23.42.0/16 ep_net
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
- name: build docker image
|
src/bin/doc/package-lock.json
|
||||||
run: |
|
-
|
||||||
docker build -f Dockerfile -t epl-debian-slim .
|
name: docker network
|
||||||
docker build -f src/tests/ratelimit/Dockerfile.nginx -t nginx-latest .
|
run: docker network create --subnet=172.23.42.0/16 ep_net
|
||||||
docker build -f src/tests/ratelimit/Dockerfile.anotherip -t anotherip .
|
-
|
||||||
- name: run docker images
|
name: build docker image
|
||||||
run: |
|
run: |
|
||||||
docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &
|
docker build -f Dockerfile -t epl-debian-slim .
|
||||||
docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest
|
docker build -f src/tests/ratelimit/Dockerfile.nginx -t nginx-latest .
|
||||||
docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip
|
docker build -f src/tests/ratelimit/Dockerfile.anotherip -t anotherip .
|
||||||
|
-
|
||||||
- name: install dependencies and create symlink for ep_etherpad-lite
|
name: run docker images
|
||||||
run: src/bin/installDeps.sh
|
run: |
|
||||||
|
docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &
|
||||||
- name: run rate limit test
|
docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest
|
||||||
run: |
|
docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip
|
||||||
cd src/tests/ratelimit
|
-
|
||||||
./testlimits.sh
|
name: install dependencies and create symlink for ep_etherpad-lite
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
|
-
|
||||||
|
name: run rate limit test
|
||||||
|
run: |
|
||||||
|
cd src/tests/ratelimit
|
||||||
|
./testlimits.sh
|
||||||
|
|
154
.github/workflows/upgrade-from-latest-release.yml
vendored
154
.github/workflows/upgrade-from-latest-release.yml
vendored
|
@ -8,84 +8,90 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Linux with Plugins
|
name: Linux with Plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node: [12, 14, 16]
|
node: [12, 14, 16]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out latest release
|
-
|
||||||
uses: actions/checkout@v2
|
name: Check out latest release
|
||||||
with:
|
uses: actions/checkout@v2
|
||||||
ref: master
|
with:
|
||||||
|
ref: master
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: ${{ matrix.node }}
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
- name: Install Etherpad plugins
|
cache: 'npm'
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
cache-dependency-path: |
|
||||||
# https://github.com/npm/cli/issues/2199
|
src/package-lock.json
|
||||||
run: >
|
src/bin/doc/package-lock.json
|
||||||
npm install --no-save --legacy-peer-deps
|
-
|
||||||
ep_align
|
name: Install Etherpad plugins
|
||||||
ep_author_hover
|
# The --legacy-peer-deps flag is required to work around a bug in npm
|
||||||
ep_cursortrace
|
# v7: https://github.com/npm/cli/issues/2199
|
||||||
ep_font_size
|
run: >
|
||||||
ep_hash_auth
|
npm install --no-save --legacy-peer-deps
|
||||||
ep_headings2
|
ep_align
|
||||||
ep_image_upload
|
ep_author_hover
|
||||||
ep_markdown
|
ep_cursortrace
|
||||||
ep_readonly_guest
|
ep_font_size
|
||||||
ep_set_title_on_pad
|
ep_hash_auth
|
||||||
ep_spellcheck
|
ep_headings2
|
||||||
ep_subscript_and_superscript
|
ep_image_upload
|
||||||
ep_table_of_contents
|
ep_markdown
|
||||||
|
ep_readonly_guest
|
||||||
# This must be run after installing the plugins, otherwise npm will try to
|
ep_set_title_on_pad
|
||||||
# hoist common dependencies by removing them from src/node_modules and
|
ep_spellcheck
|
||||||
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
ep_subscript_and_superscript
|
||||||
# logic appears to be buggy, because it sometimes removes dependencies from
|
ep_table_of_contents
|
||||||
# src/node_modules but fails to add them to the top-level node_modules. Even
|
# Etherpad core dependencies must be installed after installing the
|
||||||
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
# plugin's dependencies, otherwise npm will try to hoist common
|
||||||
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
# dependencies by removing them from src/node_modules and installing them
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
|
||||||
run: src/bin/installDeps.sh
|
# to be buggy, because it sometimes removes dependencies from
|
||||||
|
# src/node_modules but fails to add them to the top-level node_modules.
|
||||||
- name: Run the backend tests
|
# Even if npm correctly hoists the dependencies, the hoisting seems to
|
||||||
run: cd src && npm test
|
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
|
||||||
|
# rules.
|
||||||
# Because actions/checkout@v2 is called with "ref: master" and without
|
-
|
||||||
# "fetch-depth: 0", the local clone does not have the ${GITHUB_SHA} commit.
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
# Fetch ${GITHUB_REF} to get the ${GITHUB_SHA} commit. Note that a plain
|
run: src/bin/installDeps.sh
|
||||||
# "git fetch" only fetches "normal" references (refs/heads/* and
|
-
|
||||||
# refs/tags/*), and for pull requests none of the normal references include
|
name: Run the backend tests
|
||||||
# ${GITHUB_SHA}, so we have to explicitly tell Git to fetch ${GITHUB_REF}.
|
run: cd src && npm test
|
||||||
- name: Fetch the new Git commits
|
# Because actions/checkout@v2 is called with "ref: master" and without
|
||||||
run: git fetch --depth=1 origin "${GITHUB_REF}"
|
# "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
|
||||||
- name: Upgrade to the new Git revision
|
# plain "git fetch" only fetches "normal" references (refs/heads/* and
|
||||||
# For pull requests, ${GITHUB_SHA} is the automatically generated merge
|
# refs/tags/*), and for pull requests none of the normal references
|
||||||
# commit that merges the PR's source branch to its destination branch.
|
# include ${GITHUB_SHA}, so we have to explicitly tell Git to fetch
|
||||||
run: git checkout "${GITHUB_SHA}"
|
# ${GITHUB_REF}.
|
||||||
|
-
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
name: Fetch the new Git commits
|
||||||
run: src/bin/installDeps.sh
|
run: git fetch --depth=1 origin "${GITHUB_REF}"
|
||||||
|
-
|
||||||
- name: Run the backend tests
|
name: Upgrade to the new Git revision
|
||||||
run: cd src && npm test
|
# For pull requests, ${GITHUB_SHA} is the automatically generated merge
|
||||||
|
# commit that merges the PR's source branch to its destination branch.
|
||||||
- name: Install Cypress
|
run: git checkout "${GITHUB_SHA}"
|
||||||
run: npm install cypress -g
|
-
|
||||||
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
- name: Run Etherpad & Test Frontend
|
run: src/bin/installDeps.sh
|
||||||
run: |
|
-
|
||||||
node src/node/server.js &
|
name: Run the backend tests
|
||||||
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
run: cd src && npm test
|
||||||
cd src/tests/frontend
|
-
|
||||||
cypress run --spec cypress/integration/test.js --config-file cypress/cypress.json
|
name: Install Cypress
|
||||||
|
run: npm install cypress -g
|
||||||
|
-
|
||||||
|
name: Run Etherpad & Test Frontend
|
||||||
|
run: |
|
||||||
|
node src/node/server.js &
|
||||||
|
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
||||||
|
cd src/tests/frontend
|
||||||
|
cypress run --spec cypress/integration/test.js --config-file cypress/cypress.json
|
||||||
|
|
99
.github/workflows/windows-installer.yml
vendored
99
.github/workflows/windows-installer.yml
vendored
|
@ -8,54 +8,57 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
|
|
||||||
name: Build Zip & Exe
|
name: Build Zip & Exe
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: msys2/setup-msys2@v2
|
-
|
||||||
with:
|
uses: msys2/setup-msys2@v2
|
||||||
path-type: inherit
|
with:
|
||||||
install: >-
|
path-type: inherit
|
||||||
zip
|
install: >-
|
||||||
|
zip
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
cache: 'npm'
|
||||||
shell: msys2 {0}
|
cache-dependency-path: |
|
||||||
run: src/bin/installDeps.sh
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
- name: Run the backend tests
|
-
|
||||||
shell: msys2 {0}
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
run: cd src && npm test
|
shell: msys2 {0}
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
- name: Build the .zip
|
-
|
||||||
shell: msys2 {0}
|
name: Run the backend tests
|
||||||
run: src/bin/buildForWindows.sh
|
shell: msys2 {0}
|
||||||
|
run: cd src && npm test
|
||||||
- name: Extract the .zip into folder
|
-
|
||||||
run: 7z x etherpad-lite-win.zip -oetherpad-lite-new
|
name: Build the .zip
|
||||||
|
shell: msys2 {0}
|
||||||
- name: Grab nsis config
|
run: src/bin/buildForWindows.sh
|
||||||
run: git clone https://github.com/ether/etherpad_nsis.git
|
-
|
||||||
|
name: Extract the .zip into folder
|
||||||
- name: Create installer
|
run: 7z x etherpad-lite-win.zip -oetherpad-lite-new
|
||||||
uses: joncloud/makensis-action@v3.4
|
-
|
||||||
with:
|
name: Grab nsis config
|
||||||
script-file: 'etherpad_nsis/etherpad.nsi'
|
run: git clone https://github.com/ether/etherpad_nsis.git
|
||||||
|
-
|
||||||
- name: Check something..
|
name: Create installer
|
||||||
run: ls etherpad_nsis
|
uses: joncloud/makensis-action@v3.6
|
||||||
|
with:
|
||||||
- name: Archive production artifacts
|
script-file: 'etherpad_nsis/etherpad.nsi'
|
||||||
uses: actions/upload-artifact@v2
|
-
|
||||||
with:
|
name: Check something..
|
||||||
name: etherpad-server-windows.exe
|
run: ls etherpad_nsis
|
||||||
path: etherpad_nsis/etherpad-server-windows.exe
|
-
|
||||||
|
name: Archive production artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: etherpad-server-windows.exe
|
||||||
|
path: etherpad_nsis/etherpad-server-windows.exe
|
||||||
|
|
121
.github/workflows/windows-zip.yml
vendored
121
.github/workflows/windows-zip.yml
vendored
|
@ -8,70 +8,81 @@ jobs:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: msys2/setup-msys2@v2
|
-
|
||||||
with:
|
uses: msys2/setup-msys2@v2
|
||||||
path-type: inherit
|
with:
|
||||||
install: >-
|
path-type: inherit
|
||||||
zip
|
install: >-
|
||||||
|
zip
|
||||||
- name: Checkout repository
|
-
|
||||||
uses: actions/checkout@v2
|
name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
-
|
||||||
with:
|
uses: actions/setup-node@v3
|
||||||
node-version: 12
|
with:
|
||||||
|
node-version: 12
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
cache: 'npm'
|
||||||
shell: msys2 {0}
|
cache-dependency-path: |
|
||||||
run: src/bin/installDeps.sh
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
- name: Run the backend tests
|
-
|
||||||
shell: msys2 {0}
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
run: cd src && npm test
|
shell: msys2 {0}
|
||||||
|
run: src/bin/installDeps.sh
|
||||||
- name: Build the .zip
|
-
|
||||||
shell: msys2 {0}
|
name: Run the backend tests
|
||||||
run: src/bin/buildForWindows.sh
|
shell: msys2 {0}
|
||||||
|
run: cd src && npm test
|
||||||
- name: Archive production artifacts
|
-
|
||||||
uses: actions/upload-artifact@v2
|
name: Build the .zip
|
||||||
with:
|
shell: msys2 {0}
|
||||||
name: etherpad-lite-win.zip
|
run: src/bin/buildForWindows.sh
|
||||||
path: etherpad-lite-win.zip
|
-
|
||||||
|
name: Archive production artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: etherpad-lite-win.zip
|
||||||
|
path: etherpad-lite-win.zip
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
# run on pushes to any branch
|
# run on pushes to any branch
|
||||||
# run on PRs from external forks
|
# run on PRs from external forks
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request')
|
(github.event_name != 'pull_request')
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Deploy
|
name: Deploy
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download zip
|
-
|
||||||
uses: actions/download-artifact@v2
|
name: Download zip
|
||||||
with:
|
uses: actions/download-artifact@v2
|
||||||
name: etherpad-lite-win.zip
|
with:
|
||||||
|
name: etherpad-lite-win.zip
|
||||||
- name: Extract Etherpad
|
-
|
||||||
run: 7z x etherpad-lite-win.zip -oetherpad
|
name: Extract Etherpad
|
||||||
|
run: 7z x etherpad-lite-win.zip -oetherpad
|
||||||
- name: Install Cypress
|
-
|
||||||
run: npm install cypress -g
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
- name: Run Etherpad
|
node-version: 12
|
||||||
run: |
|
cache: 'npm'
|
||||||
cd etherpad
|
cache-dependency-path: |
|
||||||
node node_modules\ep_etherpad-lite\node\server.js &
|
etherpad/src/package-lock.json
|
||||||
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
etherpad/src/bin/doc/package-lock.json
|
||||||
cd src\tests\frontend
|
-
|
||||||
cypress run --spec cypress\integration\test.js --config-file cypress\cypress.json
|
name: Install Cypress
|
||||||
|
run: npm install cypress -g
|
||||||
|
-
|
||||||
|
name: Run Etherpad
|
||||||
|
run: |
|
||||||
|
cd etherpad
|
||||||
|
node node_modules\ep_etherpad-lite\node\server.js &
|
||||||
|
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
||||||
|
cd src\tests\frontend
|
||||||
|
cypress run --spec cypress\integration\test.js --config-file cypress\cypress.json
|
||||||
|
|
Loading…
Reference in a new issue