Skip to content

Calling core.setFailed() doesn't mark step as failed #25165

Answered by Yanjingzhu
williamhaw asked this question in Actions
Discussion options

You must be logged in to vote

Hi @williamhaw , 

I checked core.setFailed() in my side, it will mark the step as failed. 

Your issue is caused by " continue-on-error: true" in your Action E2E Test step , it will mark the step succeed.  

- name: Action E2E Test
        uses: ./
        id: setup-wiremock
        with:
          mappings: 'example-mapping-directory'
          files: 'example-files-directory'
          command: 'node example.test.js'
          verbose: true
        # continue-on-error: true
      - name: Get the WireMock standard output
        if: always()
        run: echo "${{ steps.setup-wiremock.outputs.wiremock-stdout }}"

You could remove the continue-on-error option. 

If you still want to run the …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants