68
68
with :
69
69
submodules : true
70
70
71
+ - name : Create .env file for the Dashboard app
72
+ working-directory : apps/dashboard
73
+ run : |
74
+ touch .env
75
+ echo VITE_LAUNCH_DARKLY_CLIENT_SIDE_ID=${{ secrets.LAUNCH_DARKLY_CLIENT_SIDE_ID }} >> .env
76
+ echo VITE_API_HOSTNAME=http://127.0.0.1:1336 >> .env
77
+ echo VITE_WEBSOCKET_HOSTNAME=http://127.0.0.1:1340 >> .env
78
+ echo VITE_LEGACY_DASHBOARD_URL=http://127.0.0.1:4200 >> .env
79
+ echo VITE_CLERK_PUBLISHABLE_KEY=${{ secrets.CLERK_E2E_PUBLISHABLE_KEY }} >> .env
80
+
81
+ - name : Create .env file for the Playwright
82
+ working-directory : apps/dashboard
83
+ run : |
84
+ touch .env.playwright
85
+ echo NOVU_ENTERPRISE=true >> .env.playwright
86
+ echo NEW_RELIC_ENABLED=false >> .env.playwright
87
+ echo NEW_RELIC_APP_NAME=Novu >> .env.playwright
88
+ echo MONGO_URL=mongodb://127.0.0.1:27017/novu-test >> .env.playwright
89
+ echo API_URL=http://127.0.0.1:1336 >> .env.playwright
90
+ echo CLERK_ENABLED=true >> .env.playwright
91
+ echo CLERK_PUBLISHABLE_KEY=${{ secrets.CLERK_E2E_PUBLISHABLE_KEY }} >> .env.playwright
92
+ echo CLERK_SECRET_KEY=${{ secrets.CLERK_E2E_SECRET_KEY }} >> .env.playwright
93
+ echo NODE_ENV=test >> .env.playwright
94
+
71
95
- uses : mansagroup/nrwl-nx-action@v3
72
96
with :
73
97
targets : build
@@ -77,30 +101,35 @@ jobs:
77
101
- uses : ./.github/actions/start-localstack
78
102
- uses : ./.github/actions/setup-redis-cluster
79
103
80
- - uses : ./.github/actions/run-backend
81
- with :
82
- cypress_github_oauth_client_id : ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_ID }}
83
- cypress_github_oauth_client_secret : ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_SECRET }}
84
- launch_darkly_sdk_key : ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
85
- ci_ee_test : ${{ steps.determine_run_type.outputs.enterprise_run }}
104
+ - name : Start API in TEST
105
+ env :
106
+ LAUNCH_DARKLY_SDK_KEY : ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
107
+ CI_EE_TEST : true
108
+ CLERK_ENABLED : true
109
+ CLERK_ISSUER_URL : https://neat-mole-83.clerk.accounts.dev
110
+ CLERK_SECRET_KEY : ${{ secrets.CLERK_E2E_SECRET_KEY }}
111
+ run : |
112
+ cd apps/api && pnpm start:test &
113
+
114
+ - name : Start Worker
115
+ shell : bash
116
+ env :
117
+ NODE_ENV : ' test'
118
+ PORT : ' 1342'
119
+ LAUNCH_DARKLY_SDK_KEY : ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
120
+ CI_EE_TEST : true
121
+ run : cd apps/worker && pnpm start:prod &
122
+
123
+ - name : Wait on API and Worker
124
+ shell : bash
125
+ run : wait-on --timeout=180000 http://127.0.0.1:1336/v1/health-check http://127.0.0.1:1342/v1/health-check
86
126
87
127
- name : Start WS
88
128
run : |
89
129
cd apps/ws && pnpm start:test &
90
130
91
- - name : Start Novu Dashboard
92
- working-directory : apps/dashboard
93
- env :
94
- REACT_APP_API_URL : http://127.0.0.1:1336
95
- REACT_APP_WS_URL : http://127.0.0.1:1340
96
- REACT_APP_WEBHOOK_URL : http://127.0.0.1:1341
97
- # Disable LaunchDarkly client-side SDK in the test environment to reduce E2E flakiness
98
- REACT_APP_LAUNCH_DARKLY_CLIENT_SIDE_ID : ' '
99
- NOVU_ENTERPRISE : ${{ steps.determine_run_type.outputs.enterprise_run }}
100
- run : pnpm start:static:build &
101
-
102
131
- name : Wait on Services
103
- run : wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:4201/
132
+ run : wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check
104
133
105
134
- name : Install Playwright
106
135
working-directory : apps/dashboard
0 commit comments