File tree Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Lint and Test
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+
13
+ strategy :
14
+ matrix :
15
+ node-version : [10, 12, 14]
16
+
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+
20
+ - name : Use Node.js ${{ matrix.node-version }}
21
+ uses : actions/setup-node@v3
22
+ with :
23
+ node-version : ${{ matrix.node-version }}
24
+
25
+ - name : Setup Chrome
26
+ uses : browser-actions/setup-chrome@latest
27
+ with :
28
+ chrome-version : stable
29
+
30
+ - name : Configure Chrome Sandbox
31
+ run : |
32
+ sudo chown root:root /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
33
+ sudo chmod 4755 /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
34
+
35
+ - name : Install dependencies
36
+ run : npm install
37
+
38
+ - name : Run ESLint and tests
39
+ run : npm test
40
+ env :
41
+ CHROME_BIN : chrome
42
+ CHROME_FLAGS : --no-sandbox --headless --disable-gpu
Original file line number Diff line number Diff line change @@ -31,6 +31,18 @@ module.exports = function ( config ) {
31
31
port : 9876 ,
32
32
33
33
logLevel : config . LOG_INFO ,
34
- browsers : [ 'PhantomJS' ]
34
+ browsers : [ 'ChromeHeadless' ] ,
35
+ customLaunchers : {
36
+ ChromeHeadless : {
37
+ base : 'Chrome' ,
38
+ flags : [
39
+ '--no-sandbox' ,
40
+ '--headless' ,
41
+ '--disable-gpu' ,
42
+ '--disable-dev-shm-usage' ,
43
+ '--disable-software-rasterizer'
44
+ ]
45
+ }
46
+ }
35
47
} ) ;
36
48
} ;
Original file line number Diff line number Diff line change 37
37
"eslint-config-wikimedia" : " 0.4.0" ,
38
38
"karma" : " ^6.1.0" ,
39
39
"karma-cli" : " ^1.0.1" ,
40
- "karma-phantomjs -launcher" : " ^1.0.4 " ,
40
+ "karma-chrome -launcher" : " ^3. 1.0" ,
41
41
"karma-qunit" : " ^4.1.2" ,
42
42
"qunit" : " ^2.14.0"
43
43
},
You can’t perform that action at this time.
0 commit comments