mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 18:36:14 -04:00
ci: Reformat .yml
files for readability
This commit is contained in:
parent
84c7da82cf
commit
43aa1e4aeb
13 changed files with 904 additions and 893 deletions
|
@ -8,66 +8,68 @@ jobs:
|
|||
# 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)
|
||||
(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
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:libreoffice/ppa
|
||||
sudo apt update
|
||||
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
||||
|
||||
# clone etherpad-lite
|
||||
- name: Install etherpad core
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ether/etherpad-lite
|
||||
|
||||
- name: Checkout plugin repository
|
||||
uses: actions/checkout@v2
|
||||
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: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
node_modules/${{ steps.plugin_name.outputs.plugin_name }}/package-lock.json
|
||||
|
||||
- name: Install plugin dependencies
|
||||
run: |
|
||||
cd ./node_modules/"${PLUGIN_NAME}"
|
||||
npm ci
|
||||
env:
|
||||
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
||||
|
||||
# This must be run after setting up the plugin, otherwise npm will try to
|
||||
# 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
|
||||
# logic appears 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 Etherpad core dependencies
|
||||
run: src/bin/installDeps.sh
|
||||
|
||||
- name: Run the backend tests
|
||||
run: cd src && npm test
|
||||
-
|
||||
name: Install libreoffice
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:libreoffice/ppa
|
||||
sudo apt update
|
||||
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
||||
-
|
||||
name: Install etherpad core
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ether/etherpad-lite
|
||||
-
|
||||
name: Checkout plugin repository
|
||||
uses: actions/checkout@v2
|
||||
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: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
node_modules/${{ steps.plugin_name.outputs.plugin_name }}/package-lock.json
|
||||
-
|
||||
name: Install plugin dependencies
|
||||
run: |
|
||||
cd ./node_modules/"${PLUGIN_NAME}"
|
||||
npm ci
|
||||
env:
|
||||
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
||||
# Etherpad core dependencies must be installed after installing the
|
||||
# plugin's dependencies, otherwise npm will try to 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 logic appears
|
||||
# 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 Etherpad core dependencies
|
||||
run: src/bin/installDeps.sh
|
||||
-
|
||||
name: Run the backend tests
|
||||
run: cd src && npm test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue