This repository was archived by the owner on Oct 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 1
1
os : linux
2
2
services :
3
- - docker
3
+ - docker
4
4
language : generic
5
+
5
6
cache :
6
7
directories :
7
8
- node_modules
8
9
- " $HOME/.cache/electron"
9
10
- " $HOME/.cache/electron-builder"
11
+
10
12
before_script :
11
- - git lfs pull
13
+ - git lfs pull
14
+ - " export DISPLAY=:99.0"
15
+ - " sh -e /etc/init.d/xvfb start"
16
+ - sleep 3 # give xvfb some time to start
17
+
12
18
script :
13
- - |
19
+ - |
14
20
docker run --rm \
15
21
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
16
22
-v ${PWD}:/project \
17
23
-v ~/.cache/electron:/root/.cache/electron \
18
24
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
19
25
electronuserland/builder:wine \
20
- /bin/bash -c "npm install && npm run build && npm run test "
26
+ /bin/bash -c "npm install && npm run test && npm run build "
21
27
before_cache :
22
- - rm -rf $HOME/.cache/electron-builder/wine
28
+ - rm -rf $HOME/.cache/electron-builder/wine
29
+
23
30
deploy :
24
31
provider : releases
25
32
api_key :
Original file line number Diff line number Diff line change 9
9
"prebuild" : " mkdir prebuild-src && cp -R src/* prebuild-src/ && node prebuild-minify.js && cd prebuild-src && npm install" ,
10
10
"build" : " ./node_modules/.bin/electron-builder build -wl -p never" ,
11
11
"postbuild" : " rm -R prebuild-src" ,
12
- "test" : " find . | grep electron " ,
12
+ "test" : " ./node_modules/.bin/nyc --reporter=lcov --reporter=text ./node_modules/.bin/mocha --timeout=3000 " ,
13
13
"posttest" : " echo coverage/lcov.info | ./node_modules/.bin/codacy-coverage"
14
14
},
15
15
"repository" : {
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ describe('application launch', function () {
7
7
8
8
beforeEach ( function ( ) {
9
9
this . app = new Application ( {
10
- path : require ( "path" ) . join ( __dirname , "../build/" )
10
+ path : require ( "path" ) . join ( __dirname , "node_modules/.bin/electron" )
11
+ args : [
12
+ require ( "path" ) . join ( __dirname , "src" )
13
+ ]
11
14
} )
12
15
return this . app . start ( )
13
16
} )
You can’t perform that action at this time.
0 commit comments