mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
checkPlugins: Revise npmpublish.yml
* Add commentary explaining why things are done the way they are. * Delete steps that were added for debugging. * Pass `--no-save` when installing `ep_etherpad-lite`.
This commit is contained in:
parent
c702fdb488
commit
029f2f765e
1 changed files with 22 additions and 5 deletions
|
@ -14,22 +14,39 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# Clone ether/etherpad-lite to ../etherpad-lite so that ep_etherpad-lite
|
||||||
|
# can be "installed" in this plugin's node_modules. The checkout v2 action
|
||||||
|
# doesn't support cloning outside of $GITHUB_WORKSPACE (see
|
||||||
|
# https://github.com/actions/checkout/issues/197), so the repo is first
|
||||||
|
# cloned to etherpad-lite then moved to ../etherpad-lite. To avoid
|
||||||
|
# conflicts with this plugin's clone, etherpad-lite must be cloned and
|
||||||
|
# moved out before this plugin's repo is cloned to $GITHUB_WORKSPACE.
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ether/etherpad-lite
|
repository: ether/etherpad-lite
|
||||||
path: etherpad-lite
|
path: etherpad-lite
|
||||||
# Work around https://github.com/actions/checkout/issues/197:
|
|
||||||
- run: mv etherpad-lite ..
|
- run: mv etherpad-lite ..
|
||||||
|
# etherpad-lite has been moved outside of $GITHUB_WORKSPACE, so it is now
|
||||||
|
# safe to clone this plugin's repo to $GITHUB_WORKSPACE.
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
# All of ep_etherpad-lite's devDependencies are installed because the
|
||||||
|
# plugin might do `require('ep_etherpad-lite/node_modules/${devDep}')`.
|
||||||
|
# Eventually it would be nice to create an ESLint plugin that prohibits
|
||||||
|
# Etherpad plugins from piggybacking off of ep_etherpad-lite's
|
||||||
|
# devDependencies. If we had that, we could change this line to only
|
||||||
|
# install production dependencies.
|
||||||
- run: cd ../etherpad-lite/src && npm ci
|
- run: cd ../etherpad-lite/src && npm ci
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm install ep_etherpad-lite@file:../etherpad-lite/src
|
# This runs some sanity checks and creates a symlink at
|
||||||
- run: git diff
|
# node_modules/ep_etherpad-lite that points to ../../etherpad-lite/src.
|
||||||
- run: ls -la node_modules
|
# This step must be done after `npm ci` installs the plugin's dependencies
|
||||||
- run: ls -la node_modules/ep_etherpad-lite/node_modules
|
# because npm "helpfully" cleans up such symlinks. :( Installing
|
||||||
|
# ep_etherpad-lite in the plugin's node_modules prevents lint errors and
|
||||||
|
# unit test failures if the plugin does `require('ep_etherpad-lite/foo')`.
|
||||||
|
- run: npm install --no-save ep_etherpad-lite@file:../etherpad-lite/src
|
||||||
- run: npm test
|
- run: npm test
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue