How to allow build to continue running, even if one of the test_script stmt is failing?

TJ's Avatar


17 Apr, 2019 11:54 AM

Appveyor.yml has following code :

- npm run project1
- npm run project2
- npm run project3

current issue is if project1 is failing full build will fail and it will not continue executing project2 and project3,But I want build to continue evenif project1 fails and want to see the status for other 2 as well, if project2 fails it should not stop it should continue till project3 and after that the build process should stop with the failed result.

  1. 1 Posted by Owen McDonnell on 17 Apr, 2019 01:27 PM

    Owen McDonnell's Avatar

    Sounds like you need to separate your build into jobs via a build matrix.

    We can give guidance if necessary, but post full yaml if thats the case.

  2. 2 Posted by Tejal Tanna on 17 Apr, 2019 02:20 PM

    Tejal Tanna's Avatar

    can i give conditions [if - else], instead of job matrix ?

  3. 3 Posted by Ilya Finkelshte... on 17 Apr, 2019 05:21 PM

    Ilya Finkelshteyn's Avatar

    Try to wrap it into PowerShell script like this:

    $success = $true
    cmd /c npm run project1
    if (-not $?) {$success = $?}
    cmd /c npm run project2
    if (-not $?) {$success = $?}
    cmd /c npm run project3
    if (-not $?) {$success = $?}
    if (-not $success) {throw "at least one step failed"}
  4. Ilya Finkelshteyn closed this discussion on 17 Jun, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac