File tree Expand file tree Collapse file tree 6 files changed +108
-9
lines changed
Expand file tree Collapse file tree 6 files changed +108
-9
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,15 @@ jobs:
4343 - name : Install dependencies & build app
4444 run : |
4545 npm ci
46- TESTING=true npm run build --if-present
46+ npm run build --if-present
4747
4848 - name : Wait for server
49- run : |
50- npm install -g wait-on
51- wait-on -i 500 -t 240000 $CYPRESS_baseUrl
49+ run : npm run wait-on $CYPRESS_baseUrl
5250
5351 - name : Enable app & configure server
5452 run : |
5553 cd cypress
56- docker-compose exec --env APP_NAME=${{ env.APP_NAME }} -T nextcloud bash /initserver.sh
54+ docker-compose exec --env APP_NAME=${{ env.APP_NAME }} --env BRANCH=${{ env.BRANCH }} - T nextcloud bash /initserver.sh
5755
5856 - name : Cypress run
5957 uses : cypress-io/github-action@v1
Original file line number Diff line number Diff line change 1- version : ' 3'
1+ version : ' 3.7 '
22
33services :
44 nextcloud :
@@ -9,8 +9,10 @@ services:
99
1010 environment :
1111 CYPRESS_baseUrl : " http://127.0.0.1:8082/index.php"
12- BRANCH : master
12+ BRANCH : " ${BRANCH:- master} "
1313
1414 volumes :
15- - ../:/var/www/html/apps/viewer
15+ # Using fallback to make sure this script doesn't mess
16+ # with the mounting if APP_NAME is not provided.
17+ - ../:/var/www/html/apps/${APP_NAME:-fallback}
1618 - ./initserver.sh:/initserver.sh
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33echo " APP_NAME: $APP_NAME "
4+ echo " BRANCH: $BRANCH "
5+
46chown -R www-data:www-data /var/www/html/data
57
68su www-data -c "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22# RUN THIS SCRIPT FROM THE ROOT FOLDER OF YOUR APP
33APP_NAME=${PWD##*/ }
4+ CYPRESS_baseUrl=http://127.0.0.1:8082/index.php
45
56if [[ $APP_NAME == " cypress" ]]
67then
78 echo " Please run this app from your app root folder."
89else
910 echo " Launching docker server for the $APP_NAME app"
1011 cd cypress
11- docker-compose up -d
12+ docker-compose pull
13+ docker-compose up -d --force-recreate
14+ npm run wait-on $CYPRESS_baseUrl
15+ echo " Nextcloud successfully installed"
1216 docker-compose exec --env APP_NAME=$APP_NAME -T nextcloud bash /initserver.sh
17+ echo " Nextcloud successfully configured"
1318fi
Original file line number Diff line number Diff line change 9696 "url-loader" : " ^4.1.1" ,
9797 "vue-loader" : " ^15.9.3" ,
9898 "vue-template-compiler" : " ^2.6.12" ,
99+ "wait-on" : " ^5.2.0" ,
99100 "webpack" : " ^4.44.2" ,
100101 "webpack-cli" : " ^3.3.12" ,
101102 "webpack-merge" : " ^5.2.0"
You can’t perform that action at this time.
0 commit comments