@@ -14,73 +14,79 @@ jobs:
1414 name : with Plugins
1515 runs-on : ubuntu-latest
1616 steps :
17- -
18- name : Install libreoffice
19- 20- with :
21- packages : libreoffice libreoffice-pdfimport
22- version : 1.0
23- -
24- name : Install etherpad core
25- uses : actions/checkout@v3
26- with :
27- repository : ether/etherpad-lite
28- path : etherpad-lite
29- - uses : pnpm/action-setup@v3
30- name : Install pnpm
31- with :
32- version : 8
33- run_install : false
34- - name : Get pnpm store directory
35- shell : bash
36- run : |
37- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38- - uses : actions/cache@v4
39- name : Setup pnpm cache
40- with :
41- path : ${{ env.STORE_PATH }}
42- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43- restore-keys : |
44- ${{ runner.os }}-pnpm-store-
45- -
46- name : Checkout plugin repository
47- uses : actions/checkout@v3
48- with :
49- path : plugin
50- -
51- name : Determine plugin name
52- id : plugin_name
53- working-directory : ./plugin
54- run : |
55- npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
56- -
57- name : Link plugin directory
58- working-directory : ./plugin
59- run : |
60- pnpm link --global
61- - name : Remove tests
62- working-directory : ./etherpad-lite
63- run : rm -rf ./src/tests/backend/specs
64- -
65- name : Install Etherpad core dependencies
66- working-directory : ./etherpad-lite
67- run : bin/installDeps.sh
68- - name : Link plugin to etherpad-lite
69- working-directory : ./etherpad-lite
70- run : |
71- pnpm link --global $PLUGIN_NAME
72- pnpm run install-plugins --path ../../plugin
73- env :
74- PLUGIN_NAME : ${{ steps.plugin_name.outputs.plugin_name }}
75- - name : Link ep_etherpad-lite
76- working-directory : ./etherpad-lite/src
77- run : |
78- pnpm link --global
79- - name : Link etherpad to plugin
80- working-directory : ./plugin
81- run : |
82- pnpm link --global ep_etherpad-lite
83- -
84- name : Run the backend tests
85- working-directory : ./etherpad-lite
86- run : pnpm run test
17+ -
18+ name : Install libreoffice
19+ 20+ with :
21+ packages : libreoffice libreoffice-pdfimport
22+ version : 1.0
23+ -
24+ name : Install etherpad core
25+ uses : actions/checkout@v3
26+ with :
27+ repository : ether/etherpad-lite
28+ path : etherpad-lite
29+ - uses : pnpm/action-setup@v3
30+ name : Install pnpm
31+ with :
32+ version : 8
33+ run_install : false
34+ - name : Get pnpm store directory
35+ shell : bash
36+ run : |
37+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38+ - uses : actions/cache@v4
39+ name : Setup pnpm cache
40+ with :
41+ path : ${{ env.STORE_PATH }}
42+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+ restore-keys : |
44+ ${{ runner.os }}-pnpm-store-
45+ -
46+ name : Checkout plugin repository
47+ uses : actions/checkout@v3
48+ with :
49+ path : plugin
50+ -
51+ name : Determine plugin name
52+ id : plugin_name
53+ working-directory : ./plugin
54+ run : |
55+ npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
56+ -
57+ name : Link plugin directory
58+ working-directory : ./plugin
59+ run : |
60+ pnpm link --global
61+ - name : Remove tests
62+ working-directory : ./etherpad-lite
63+ run : rm -rf ./src/tests/backend/specs
64+ -
65+ name : Install Etherpad core dependencies
66+ working-directory : ./etherpad-lite
67+ run : bin/installDeps.sh
68+ - name : Link plugin to etherpad-lite
69+ working-directory : ./etherpad-lite
70+ run : |
71+ pnpm link --global $PLUGIN_NAME
72+ pnpm run install-plugins --path ../../plugin
73+ env :
74+ PLUGIN_NAME : ${{ steps.plugin_name.outputs.plugin_name }}
75+ - name : Link ep_etherpad-lite
76+ working-directory : ./etherpad-lite/src
77+ run : |
78+ pnpm link --global
79+ - name : Link etherpad to plugin
80+ working-directory : ./plugin
81+ run : |
82+ pnpm link --global ep_etherpad-lite
83+ -
84+ name : Run the backend tests
85+ working-directory : ./etherpad-lite
86+ run : |
87+ res=$(find .. -path "./node_modules/ep_*/static/tests/backend/specs/**" | wc -l)
88+ if [ $res -eq 0 ]; then
89+ echo "No backend tests found"
90+ else
91+ pnpm run test
92+ fi
0 commit comments