From 06b6e48a16c0cef855cc93fa36d83a4b2d2f7025 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Thu, 6 Apr 2023 22:07:18 +0500 Subject: [PATCH] chore: deploy the streaming app to sas9.4gl.io --- .github/workflows/build.yml | 12 +++++++----- sasjs-tests/sasjs/sasjsconfig.json | 23 +++++++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04ff578..71aa5e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,8 +64,10 @@ jobs: - name: Start Open VPN 3 run: openvpn3 session-start --config .github/vpn/config.ovpn - - name: install pm2 - run: npm i -g pm2 + - name: add .env.4gl + run: | + echo "CLIENT=${{secrets.SAS9_4GL_IO_CLIENT}}"> .env.4gl + echo "ACCESS_TOKEN=${{secrets.SAS9_4GL_IO_ACCESS_TOKEN}}" >> .env.4gl - name: Deploy sasjs-tests run: | @@ -77,12 +79,12 @@ jobs: replace-in-files --regex='"userName".*' --replacement='"userName":"${{ secrets.SASJS_USERNAME }}",' ./public/config.json replace-in-files --regex='"password".*' --replacement='"password":"${{ secrets.SASJS_PASSWORD }}",' ./public/config.json replace-in-files --regex='"serverType".*' --replacement='"serverType":"SASJS",' ./public/config.json - npm run update:adapter - pm2 start --name sasjs-test npm -- start + npm run update:adapter && npm run build + npx sasjs cbd -t 4gl - name: Run cypress on sasjs run: | - replace-in-files --regex='"sasjsTestsUrl".*' --replacement='"sasjsTestsUrl":"http://localhost:3000",' ./cypress.json + replace-in-files --regex='"sasjsTestsUrl".*' --replacement='"sasjsTestsUrl":"${{ secrets.SASJS_TEST_URL }}",' ./cypress.json replace-in-files --regex='"username".*' --replacement='"username":"${{ secrets.SASJS_USERNAME }}",' ./cypress.json replace-in-files --regex='"password".*' --replacement='"password":"${{ secrets.SASJS_PASSWORD }}",' ./cypress.json sh ./sasjs-tests/sasjs-cypress-run.sh ${{ secrets.MATRIX_TOKEN }} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/sasjs-tests/sasjs/sasjsconfig.json b/sasjs-tests/sasjs/sasjsconfig.json index 331a467..f0193c2 100644 --- a/sasjs-tests/sasjs/sasjsconfig.json +++ b/sasjs-tests/sasjs/sasjsconfig.json @@ -1,17 +1,28 @@ { "$schema": "https://cli.sasjs.io/sasjsconfig-schema.json", "serviceConfig": { - "serviceFolders": [ - "sasjs/common" - ] + "serviceFolders": ["sasjs/common"] }, "defaultTarget": "4gl", "targets": [ { "name": "4gl", - "serverType": "SASJS", "serverUrl": "https://sas9.4gl.io", - "appLoc": "/Public/app/adapter-tests" + "serverType": "SASJS", + "httpsAgentOptions": { + "allowInsecureRequests": false + }, + "appLoc": "/Public/app/adapter-tests", + "deployConfig": { + "deployServicePack": true, + "deployScripts": [] + }, + "streamConfig": { + "streamWeb": true, + "streamWebFolder": "webv", + "webSourcePath": "build", + "streamServiceName": "adapter-tests" + } } ] -} \ No newline at end of file +}