File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 - name : Build
3838 run : npm run build
3939
40+ - uses : actions/upload-artifact@v4
41+ with :
42+ name : build
43+ path : dist
44+
4045 - name : Audit
4146 run : npm audit
4247
4651 - name : Test (Formatting)
4752 run : npm run test:formatting
4853
54+ test_service :
55+ name : Test (Service Client)
56+ runs-on : ubuntu-latest
57+ environment : QA
58+ needs : build
59+
60+ steps :
61+ - uses : actions/checkout@v3
62+ with :
63+ fetch-depth : 2
64+
65+ - uses : actions/setup-node@v3
66+ with :
67+ node-version : 20
68+ registry-url : https://registry.npmjs.org/
69+
70+ - name : Install dependencies
71+ run : npm ci
72+
73+ - uses : actions/download-artifact@v4
74+ with :
75+ name : build
76+
4977 - name : Test (Service Client)
5078 env :
5179 ITP_API_URL : ${{ vars.ITP_API_URL }}
5583 ITP_MAILINATOR_API_KEY : ${{ secrets.ITP_MAILINATOR_API_KEY }}
5684 run : npm run test:service
5785
86+ test_native :
87+ name : Test (Native Client)
88+ runs-on : ubuntu-latest
89+ environment : QA
90+ needs : build
91+
92+ steps :
93+ - uses : actions/checkout@v3
94+ with :
95+ fetch-depth : 2
96+
97+ - uses : actions/setup-node@v3
98+ with :
99+ node-version : 20
100+ registry-url : https://registry.npmjs.org/
101+
102+ - name : Install dependencies
103+ run : npm ci
104+
105+ - uses : actions/download-artifact@v4
106+ with :
107+ name : build
108+
58109 - name : Test (Native Client)
59110 env :
60111 ITP_API_URL : ${{ vars.ITP_API_URL }}
Original file line number Diff line number Diff line change @@ -24,9 +24,13 @@ const tests = () => describe('list', () => {
2424 } ) ;
2525
2626 after ( async ( ) => {
27- await runCommand ( `itwin delete --itwin-id ${ testITwin1Child . id } ` ) ;
28- await runCommand ( `itwin delete --itwin-id ${ testITwin1 . id } ` ) ;
29- await runCommand ( `itwin delete --itwin-id ${ testITwin2 . id } ` ) ;
27+ const deleteResult1 = await runCommand ( `itwin delete --itwin-id ${ testITwin1Child . id } ` ) ;
28+ const deleteResult2 = await runCommand ( `itwin delete --itwin-id ${ testITwin1 . id } ` ) ;
29+ const deleteResult3 = await runCommand ( `itwin delete --itwin-id ${ testITwin2 . id } ` ) ;
30+
31+ expect ( deleteResult1 . result ) . to . have . property ( 'result' , 'deleted' ) ;
32+ expect ( deleteResult2 . result ) . to . have . property ( 'result' , 'deleted' ) ;
33+ expect ( deleteResult3 . result ) . to . have . property ( 'result' , 'deleted' ) ;
3034 } )
3135
3236 it ( 'should fail when provided bad subClass' , async ( ) => {
Original file line number Diff line number Diff line change @@ -204,7 +204,10 @@ export const isNativeAuthAccessTokenCached = (): boolean => {
204204const getTokenPathByOS = ( ) => {
205205 switch ( os . type ( ) ) {
206206 case 'Linux' : {
207- return `${ os . homedir ( ) } /.cache/itp/token.json`
207+ const cachePath = `${ os . homedir ( ) } /.cache/itp`
208+ if ( ! fs . existsSync ( cachePath ) )
209+ fs . mkdirSync ( cachePath , { recursive : true } )
210+ return `${ cachePath } /token.json`
208211 }
209212
210213 case 'Windows_NT' : {
You can’t perform that action at this time.
0 commit comments