-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #588 from nextcloud/enh/github-actions/use-server-…
…container Use nextcloudci/server, cleanup github actions cypress process
- Loading branch information
Showing
7 changed files
with
53 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3' | ||
|
||
services: | ||
nextcloud: | ||
image: nextcloudci/server | ||
|
||
ports: | ||
- 8082:80 | ||
|
||
environment: | ||
CYPRESS_baseUrl: "http://127.0.0.1:8082/index.php" | ||
BRANCH: master | ||
|
||
volumes: | ||
- ../:/var/www/html/apps/viewer | ||
- ./initserver.sh:/initserver.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "APP_NAME: $APP_NAME" | ||
chown -R www-data:www-data /var/www/html/data | ||
|
||
su www-data -c " | ||
php occ config:system:set force_language --value en | ||
php occ app:enable $APP_NAME | ||
php occ app:list | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#! /bin/sh | ||
#!/usr/bin/env bash | ||
# RUN THIS SCRIPT FROM THE ROOT FOLDER OF YOUR APP | ||
appname=${PWD##*/} | ||
APP_NAME=${PWD##*/} | ||
|
||
if [[ $appname == "cypress" ]] | ||
if [[ $APP_NAME == "cypress" ]] | ||
then | ||
echo "Please run this app from your app root folder." | ||
else | ||
echo "Launching docker server for the $appname app" | ||
dockername="cypress_testing_$appname" | ||
|
||
docker run -p 8000:80 --rm --name $dockername --volume $(pwd):/var/www/html/apps/$appname --env BRANCH=master --detach nextcloudci/server:latest | ||
npm i --no-save wait-on | ||
npm run wait-on -- http://localhost:8000 | ||
docker exec --user www-data $dockername php occ app:enable $appname | ||
docker exec --user www-data $dockername php occ config:system:set force_language --value en | ||
echo "Launching docker server for the $APP_NAME app" | ||
cd cypress | ||
docker-compose up -d | ||
docker-compose exec --env APP_NAME=$APP_NAME -T nextcloud bash /initserver.sh | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters