@@ -9,6 +9,23 @@ install-dependencies:
9
9
npm ci --prefer-offline --include=dev
10
10
npx playwright install
11
11
12
+ # Install additional test dependencies to run VSCode testing in headless mode (on Linux)
13
+ # ref: https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
14
+ .PHONY : install-test-dependencies
15
+ install-test-dependencies :
16
+ @echo " Installing test dependencies for $( shell uname -s) "
17
+ @if [ $$ (uname -s) = " Linux" ]; then \
18
+ sudo apt-get update; \
19
+ sudo apt install -y libgbm1 libgtk-3-0 xvfb; \
20
+ elif [ $$ (uname -s) = " Darwin" ]; then \
21
+ sudo brew update; \
22
+ sudo brew install gtk+3; \
23
+ sudo brew install --cask xquartz; \
24
+ else \
25
+ echo " Unsupported OS for headless testing" ; \
26
+ exit 1; \
27
+ fi
28
+
12
29
.PHONY : setup-test-env
13
30
setup-test-env :
14
31
@echo " Pulling automated-test-user credentials from Vault into .env file for testing"
@@ -20,22 +37,8 @@ remove-test-env:
20
37
@echo " Removing .env file"
21
38
@rm -f .env
22
39
23
- # Install additional test dependencies to run VSCode testing in headless mode (on Linux)
24
- # ref: https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
25
40
.PHONY : test
26
- test : setup-test-env install-dependencies
27
- @echo " Installing test dependencies for $( shell uname -s) "
28
- @if [ $$ (uname -s) = " Linux" ]; then \
29
- sudo apt-get update; \
30
- sudo apt install -y libgbm1 libgtk-3-0 xvfb; \
31
- elif [ $$ (uname -s) = " Darwin" ]; then \
32
- brew update; \
33
- brew install gtk+3; \
34
- brew install --cask xquartz; \
35
- else \
36
- echo " Unsupported OS for headless testing" ; \
37
- exit 1; \
38
- fi
41
+ test : setup-test-env install-test-dependencies install-dependencies
39
42
npx gulp ci
40
43
@if [ $$ (uname -s) = " Linux" ]; then \
41
44
xvfb-run -a npx gulp test ; \
0 commit comments