Skip to content

Commit

Permalink
fix(ci): exit actions on test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
lslzl3000 committed May 4, 2023
1 parent c663640 commit c6af5ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/ci/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ const createWindow = async ()=>{
console.log(`\x1b[33m[${log.target}]\x1b[0m`)
console.table(log.result)
console.log('\n-----------------')
// quit ci on any test fail
for(let test in log.result){
if(log.result[test].fail !== 0){
vite.kill()
process.exit(1)
}
}
})

await win.loadURL(HOST + '/test/?auto')
Expand Down

0 comments on commit c6af5ed

Please sign in to comment.