File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,5 +117,28 @@ jobs:
117117 chromedriver --url-base='/wd/hub' --port=4444 &
118118 yarn run e2e:ci
119119
120+ # Start up the app with SSR enabled (run in background)
121+ - name : Start app in SSR (server-side rendering) mode
122+ run : |
123+ nohup yarn run serve:ssr &
124+ printf 'Waiting for app to start'
125+ until curl --output /dev/null --silent --head --fail http://localhost:4000/home; do
126+ printf '.'
127+ sleep 2
128+ done
129+ echo "App started successfully."
130+
131+ # Get homepage and verify that the <meta name="title"> tag includes "DSpace".
132+ # If it does, then SSR is working, as this tag is created by our MetadataService.
133+ # This step also prints entire HTML of homepage for easier debugging if grep fails.
134+ - name : Verify SSR (server-side rendering)
135+ run : |
136+ result=$(wget -O- -q http://localhost:4000/home)
137+ echo "$result"
138+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep DSpace
139+
140+ - name : Stop running app
141+ run : kill -9 $(lsof -t -i:4000)
142+
120143 - name : Shutdown Docker containers
121144 run : docker-compose -f ./docker/docker-compose-ci.yml down
You can’t perform that action at this time.
0 commit comments