File tree Expand file tree Collapse file tree 2 files changed +4
-50
lines changed
Expand file tree Collapse file tree 2 files changed +4
-50
lines changed Original file line number Diff line number Diff line change 4141 run : npm ci
4242
4343 - name : Run test suite
44- env :
45- THEMIS_CI_DEBUG_OUTPUT : ${{ github.workspace }}/.themis/ci-failure.json
4644 run : npm test
4745
48- - name : Upload CI failure payload
49- if : always()
50- uses : actions/upload-artifact@v4
51- with :
52- name : themis-ci-debug
53- retention-days : 7
54- path : .themis/ci-failure.json
55- if-no-files-found : ignore
56-
5746 release-surface :
5847 name : Release Surface (Node 20)
5948 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -96,45 +96,10 @@ describe('code scan generation', () => {
9696
9797 function runCliJson ( tempDir , args ) {
9898 const run = runCli ( tempDir , args ) ;
99- let payload ;
100- let parsed = true ;
101- try {
102- payload = JSON . parse ( run . stdout || run . output ) ;
103- } catch ( error ) {
104- parsed = false ;
105- payload = {
106- summary : {
107- failed : 1
108- } ,
109- error : error . message ,
110- rawOutput : run . output
111- } ;
112- }
113- const debugPath = process . env . THEMIS_CI_DEBUG_OUTPUT ;
114- if ( debugPath && payload . summary && payload . summary . failed > 0 ) {
115- const absoluteDebugPath = path . isAbsolute ( debugPath )
116- ? debugPath
117- : path . join ( tempDir , '.themis' , debugPath ) ;
118- fs . mkdirSync ( path . dirname ( absoluteDebugPath ) , { recursive : true } ) ;
119- fs . writeFileSync (
120- absoluteDebugPath ,
121- JSON . stringify (
122- {
123- args,
124- parsed,
125- payload,
126- exitCode : run . status ,
127- stderr : run . stderr ,
128- stdout : run . stdout
129- } ,
130- null ,
131- 2
132- ) ,
133- 'utf8'
134- ) ;
135- console . log ( `CI debug payload written to ${ absoluteDebugPath } ` ) ;
136- }
137- return { run, payload } ;
99+ return {
100+ run,
101+ payload : JSON . parse ( run . stdout || run . output )
102+ } ;
138103 }
139104
140105 function parseJsonOutput ( result ) {
You can’t perform that action at this time.
0 commit comments