File tree Expand file tree Collapse file tree 5 files changed +42
-45
lines changed
Expand file tree Collapse file tree 5 files changed +42
-45
lines changed Original file line number Diff line number Diff line change 44 SCRIPT_DIR : ./.github/scripts
55
66jobs :
7- # test:
8- # strategy:
9- # matrix:
10- # os: [macos-latest, ubuntu-latest, windows-latest]
11- # runs-on: ${{ matrix.os }}
12- # steps:
13- # - uses: actions/checkout@v3
14- # - uses: actions/setup-node@v3
15- # with:
16- # node-version: 18
17- # - run: yarn install
18- # - name: Run tests
19- # uses: GabrielBB/xvfb-action@v1.0
20- # with:
21- # run: npm run test
7+ test :
8+ strategy :
9+ matrix :
10+ os : [macos-latest, ubuntu-latest, windows-latest]
11+ runs-on : ${{ matrix.os }}
12+ steps :
13+ - uses : actions/checkout@v3
14+ - uses : actions/setup-node@v3
15+ with :
16+ node-version : 18
17+ - run : npm install
18+ - name : Run tests
19+ uses : GabrielBB/xvfb-action@v1.0
20+ with :
21+ run : npm run test
2222 build :
2323 runs-on : ubuntu-latest
2424 env :
2525 VSIX_FILE : vscode-R.vsix
2626 steps :
2727 - uses : actions/checkout@v3
2828 - run : node $SCRIPT_DIR/enableWebpack.js
29- - run : yarn install
29+ - run : npm install
3030 - uses : lannonbr/vsce-action@4.0.0
3131 with :
3232 args : " package -o $VSIX_FILE"
4141 - uses : actions/setup-node@v3
4242 with :
4343 node-version : 18
44- - run : yarn install
45- - run : yarn run lint
44+ - run : npm install
45+ - run : npm run lint
4646 markdownlint-cli :
4747 runs-on : ubuntu-latest
4848 steps :
7979 - uses : actions/setup-node@v3
8080 with :
8181 node-version : 18
82- - run : yarn install
82+ - run : npm install
8383 - name : Run devreplay
8484 run : ./node_modules/.bin/devreplay ./src devreplay.json
Original file line number Diff line number Diff line change 1616 steps :
1717 - uses : actions/checkout@v3
1818 - run : node $SCRIPT_DIR/enableWebpack.js
19- - run : yarn install
19+ - run : npm install
2020 - uses : lannonbr/vsce-action@4.0.0
2121 with :
2222 args : " package -o $FILE_OUT"
Original file line number Diff line number Diff line change 1616 steps :
1717 - uses : actions/checkout@v3
1818 - run : node $SCRIPT_DIR/enableWebpack.js
19- - run : yarn install
19+ - run : npm install
2020 - uses : lannonbr/vsce-action@4.0.0
2121 with :
2222 args : " package"
5757 steps :
5858 - uses : actions/checkout@v3
5959 - run : node $SCRIPT_DIR/enableWebpack.js
60- - run : yarn install
60+ - run : npm install
6161 - name : Publish to Open VSX Registry
6262 uses : HaaLeo/publish-vscode-extension@v1
6363 id : publishToOpenVSX
Original file line number Diff line number Diff line change 1010 "command" : " vsce" ,
1111 "args" : [
1212 " package" ,
13- " --yarn" ,
1413 " -o" ,
1514 " ${workspaceFolderBasename}.vsix"
1615 ]
Original file line number Diff line number Diff line change 44
55import * as path from 'path' ;
66import * as Mocha from 'mocha' ;
7- // @ts -ignore: all
87import { glob } from 'glob' ;
98
109export function run ( ) : Promise < void > {
@@ -17,27 +16,26 @@ export function run(): Promise<void> {
1716 const testsRoot = path . resolve ( __dirname , '..' ) ;
1817
1918 return new Promise ( ( c , e ) => {
20- // @ts -ignore: all
21- glob ( '**/**.test.js' , { cwd : testsRoot } , ( err , files ) => {
22- if ( err ) {
23- return e ( err ) ;
24- }
25-
26- // Add files to the test suite
27- files . forEach ( ( f : string ) => mocha . addFile ( path . resolve ( testsRoot , f ) ) ) ;
19+ glob ( '**/**.test.js' , { cwd : testsRoot } )
20+ . then ( files => {
21+ // Add files to the test suite
22+ files . forEach ( f => mocha . addFile ( path . resolve ( testsRoot , f ) ) ) ;
2823
29- try {
30- // Run the mocha test
31- mocha . run ( failures => {
32- if ( failures > 0 ) {
33- e ( new Error ( `${ failures } tests failed.` ) ) ;
34- } else {
35- c ( ) ;
36- }
37- } ) ;
38- } catch ( err ) {
39- e ( err ) ;
40- }
41- } ) ;
24+ try {
25+ // Run the mocha test
26+ mocha . run ( failures => {
27+ if ( failures > 0 ) {
28+ e ( new Error ( `${ failures } tests failed.` ) ) ;
29+ } else {
30+ c ( ) ;
31+ }
32+ } ) ;
33+ } catch ( err ) {
34+ e ( err ) ;
35+ }
36+ } )
37+ . catch ( err => {
38+ return e ( err ) ;
39+ } ) ;
4240 } ) ;
4341}
You can’t perform that action at this time.
0 commit comments