mirror of https://github.com/OpenVidu/openvidu.git
GitHub Actions: move "serve testapp" to commons.sh
parent
705ac24e3b
commit
a65a22e204
|
@ -95,6 +95,8 @@ jobs:
|
||||||
run: ci-scripts/openvidu-e2e-tests.sh --openvidu-server-build
|
run: ci-scripts/openvidu-e2e-tests.sh --openvidu-server-build
|
||||||
- name: Environment launch Kurento
|
- name: Environment launch Kurento
|
||||||
run: ci-scripts/openvidu-e2e-tests.sh --environment-launch-kurento
|
run: ci-scripts/openvidu-e2e-tests.sh --environment-launch-kurento
|
||||||
|
- name: Serve Testapp
|
||||||
|
run: ci-scripts/commons.sh --serve-openvidu-testapp
|
||||||
- name: OpenVidu E2E Tests Kurento
|
- name: OpenVidu E2E Tests Kurento
|
||||||
run: ci-scripts/openvidu-e2e-tests.sh --openvidu-e2e-tests-kurento
|
run: ci-scripts/openvidu-e2e-tests.sh --openvidu-e2e-tests-kurento
|
||||||
- name: Test reports
|
- name: Test reports
|
||||||
|
|
|
@ -12,6 +12,7 @@ BUILD_OV_NODE_CLIENT=false
|
||||||
BUILD_OV_JAVA_CLIENT=false
|
BUILD_OV_JAVA_CLIENT=false
|
||||||
BUILD_OV_PARENT=false
|
BUILD_OV_PARENT=false
|
||||||
BUILD_OV_TESTAPP=false
|
BUILD_OV_TESTAPP=false
|
||||||
|
SERVE_OV_TESTAPP=false
|
||||||
|
|
||||||
# cd to directory if GITHUB_ACTIONS_WORKING_DIR is set
|
# cd to directory if GITHUB_ACTIONS_WORKING_DIR is set
|
||||||
if [[ -n "${GITHUB_ACTIONS_WORKING_DIR:-}" ]]; then
|
if [[ -n "${GITHUB_ACTIONS_WORKING_DIR:-}" ]]; then
|
||||||
|
@ -51,6 +52,10 @@ if [[ -n ${1:-} ]]; then
|
||||||
BUILD_OV_TESTAPP=true
|
BUILD_OV_TESTAPP=true
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
--serve-openvidu-testapp )
|
||||||
|
SERVE_OV_TESTAPP=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
@ -233,3 +238,19 @@ if [[ "${BUILD_OV_TESTAPP}" == true || "${EXECUTE_ALL}" == true ]]; then
|
||||||
export NG_CLI_ANALYTICS="false" && ./node_modules/@angular/cli/bin/ng.js build --configuration production --output-path=/opt/openvidu/testapp
|
export NG_CLI_ANALYTICS="false" && ./node_modules/@angular/cli/bin/ng.js build --configuration production --output-path=/opt/openvidu/testapp
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# -------------
|
||||||
|
# Serve OpenVidu TestApp
|
||||||
|
# -------------
|
||||||
|
if [[ "${SERVE_OV_TESTAPP}" == true || "${EXECUTE_ALL}" == true ]]; then
|
||||||
|
# Generate certificate
|
||||||
|
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 \
|
||||||
|
-subj "/CN=www.mydom.com/O=My Company LTD./C=US" \
|
||||||
|
-keyout /opt/openvidu/testapp/key.pem \
|
||||||
|
-out /opt/openvidu/testapp/cert.pem
|
||||||
|
|
||||||
|
# Serve TestApp
|
||||||
|
pushd /opt/openvidu/testapp
|
||||||
|
http-server -S -p 4200 &> /opt/openvidu/testapp.log &
|
||||||
|
popd
|
||||||
|
fi
|
|
@ -27,13 +27,7 @@ function environmentLaunch {
|
||||||
# Kurento and mediasoup needs to run as network host, so we need Docker host IP.
|
# Kurento and mediasoup needs to run as network host, so we need Docker host IP.
|
||||||
local DOCKER_HOST_IP
|
local DOCKER_HOST_IP
|
||||||
DOCKER_HOST_IP="$(docker network inspect bridge | grep Subnet | cut -d'"' -f4 | cut -d'/' -f1 | sed 's/.$/1/')"
|
DOCKER_HOST_IP="$(docker network inspect bridge | grep Subnet | cut -d'"' -f4 | cut -d'/' -f1 | sed 's/.$/1/')"
|
||||||
openssl req -newkey rsa:2048 \
|
|
||||||
-new -nodes -x509 -days 3650 \
|
|
||||||
-subj "/CN=www.mydom.com/O=My Company LTD./C=US" \
|
|
||||||
-keyout /opt/openvidu/testapp/key.pem \
|
|
||||||
-out /opt/openvidu/testapp/cert.pem
|
|
||||||
pushd /opt/openvidu/testapp
|
|
||||||
http-server -S -p 4200 &> /opt/openvidu/testapp.log &
|
|
||||||
if [[ "${MEDIA_SERVER}" == "kurento" ]]; then
|
if [[ "${MEDIA_SERVER}" == "kurento" ]]; then
|
||||||
docker run -e KMS_UID=$(id -u) --network=host --detach=true --volume=/opt/openvidu/recordings:/opt/openvidu/recordings "${KURENTO_MEDIA_SERVER_IMAGE}"
|
docker run -e KMS_UID=$(id -u) --network=host --detach=true --volume=/opt/openvidu/recordings:/opt/openvidu/recordings "${KURENTO_MEDIA_SERVER_IMAGE}"
|
||||||
while true; do
|
while true; do
|
||||||
|
|
Loading…
Reference in New Issue