ci: Enable caching
parent
3732565f83
commit
63a02ec5fa
|
@ -25,6 +25,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install libreoffice
|
- name: Install libreoffice
|
||||||
run: |
|
run: |
|
||||||
|
@ -59,6 +63,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install libreoffice
|
- name: Install libreoffice
|
||||||
run: |
|
run: |
|
||||||
|
@ -114,6 +122,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
run: src/bin/installOnWindows.bat
|
run: src/bin/installOnWindows.bat
|
||||||
|
@ -142,6 +154,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install Etherpad plugins
|
- name: Install Etherpad plugins
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
||||||
|
|
|
@ -25,11 +25,17 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
load: true
|
load: true
|
||||||
tags: ${{ env.TEST_TAG }}
|
tags: ${{ env.TEST_TAG }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
-
|
-
|
||||||
name: Set up Node.js
|
name: Set up Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -26,6 +26,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install etherpad plugins
|
- name: Install etherpad plugins
|
||||||
# We intentionally install an old ep_align version to test upgrades to the minor version number.
|
# We intentionally install an old ep_align version to test upgrades to the minor version number.
|
||||||
|
|
|
@ -21,6 +21,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
run: src/bin/installDeps.sh
|
run: src/bin/installDeps.sh
|
||||||
|
@ -70,6 +74,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install Etherpad plugins
|
- name: Install Etherpad plugins
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
||||||
|
|
|
@ -20,6 +20,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install lockfile-lint
|
- name: Install lockfile-lint
|
||||||
run: npm install --no-save lockfile-lint
|
run: npm install --no-save lockfile-lint
|
||||||
|
|
|
@ -20,6 +20,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
run: src/bin/installDeps.sh
|
run: src/bin/installDeps.sh
|
||||||
|
@ -46,6 +50,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install etherpad-load-test
|
- name: Install etherpad-load-test
|
||||||
run: sudo npm install -g etherpad-load-test
|
run: sudo npm install -g etherpad-load-test
|
||||||
|
@ -98,6 +106,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
run: src/bin/installDeps.sh
|
run: src/bin/installDeps.sh
|
||||||
|
|
|
@ -19,6 +19,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: docker network
|
- name: docker network
|
||||||
run: docker network create --subnet=172.23.42.0/16 ep_net
|
run: docker network create --subnet=172.23.42.0/16 ep_net
|
||||||
|
|
|
@ -27,6 +27,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install Etherpad plugins
|
- name: Install Etherpad plugins
|
||||||
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
|
||||||
|
|
|
@ -27,6 +27,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
|
|
@ -26,6 +26,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
@ -65,6 +69,14 @@ jobs:
|
||||||
- name: Extract Etherpad
|
- name: Extract Etherpad
|
||||||
run: 7z x etherpad-lite-win.zip -oetherpad
|
run: 7z x etherpad-lite-win.zip -oetherpad
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
etherpad/src/package-lock.json
|
||||||
|
etherpad/src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Install Cypress
|
- name: Install Cypress
|
||||||
run: npm install cypress -g
|
run: npm install cypress -g
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 12
|
|
||||||
|
|
||||||
- name: Install libreoffice
|
- name: Install libreoffice
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository -y ppa:libreoffice/ppa
|
sudo add-apt-repository -y ppa:libreoffice/ppa
|
||||||
|
@ -47,6 +43,15 @@ jobs:
|
||||||
env:
|
env:
|
||||||
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
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
|
- name: Install plugin dependencies
|
||||||
run: |
|
run: |
|
||||||
cd ./node_modules/"${PLUGIN_NAME}"
|
cd ./node_modules/"${PLUGIN_NAME}"
|
||||||
|
|
|
@ -15,15 +15,19 @@ jobs:
|
||||||
printf %s\\n '::set-output name=name::${{github.event.repository.name}} ${{ github.workflow }} - ${{ github.job }}'
|
printf %s\\n '::set-output name=name::${{github.event.repository.name}} ${{ github.workflow }} - ${{ github.job }}'
|
||||||
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
||||||
|
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 12
|
|
||||||
|
|
||||||
- name: Check out Etherpad core
|
- name: Check out Etherpad core
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ether/etherpad-lite
|
repository: ether/etherpad-lite
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
src/package-lock.json
|
||||||
|
src/bin/doc/package-lock.json
|
||||||
|
|
||||||
- name: Check out the plugin
|
- name: Check out the plugin
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -29,9 +29,20 @@ jobs:
|
||||||
# etherpad-lite has been moved outside of $GITHUB_WORKSPACE, so it is now
|
# etherpad-lite has been moved outside of $GITHUB_WORKSPACE, so it is now
|
||||||
# safe to clone this plugin's repo to $GITHUB_WORKSPACE.
|
# safe to clone this plugin's repo to $GITHUB_WORKSPACE.
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v1
|
# This is necessary for actions/setup-node because '..' can't be used in
|
||||||
|
# cache-dependency-path.
|
||||||
|
- name: Create ep_etherpad-lite symlink
|
||||||
|
run: |
|
||||||
|
mkdir -p node_modules
|
||||||
|
ln -s ../../etherpad-lite/src node_modules/ep_etherpad-lite
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
node_modules/ep_etherpad-lite/package-lock.json
|
||||||
|
node_modules/ep_etherpad-lite/bin/doc/package-lock.json
|
||||||
|
package-lock.json
|
||||||
# All of ep_etherpad-lite's devDependencies are installed because the
|
# All of ep_etherpad-lite's devDependencies are installed because the
|
||||||
# plugin might do `require('ep_etherpad-lite/node_modules/${devDep}')`.
|
# plugin might do `require('ep_etherpad-lite/node_modules/${devDep}')`.
|
||||||
# Eventually it would be nice to create an ESLint plugin that prohibits
|
# Eventually it would be nice to create an ESLint plugin that prohibits
|
||||||
|
@ -58,10 +69,11 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
|
cache: 'npm'
|
||||||
- name: Bump version (patch)
|
- name: Bump version (patch)
|
||||||
run: |
|
run: |
|
||||||
LATEST_TAG=$(git describe --tags --abbrev=0) || exit 1
|
LATEST_TAG=$(git describe --tags --abbrev=0) || exit 1
|
||||||
|
|
Loading…
Reference in New Issue