How to set JS tests in GitHub actions to output success for action

I’m using GitHub actions to run my JS unit tests here

The final line in the action is:

 - run: npm run test:unit

but the status of the action is “completed” rather than success, but the conclusion is “success”. How would I change the status of the action to say “success”?

In essence, this is in ref to trying to do an automerge with dependabot but the status checks must be green. The problem is the GitHub action that is checking the status is failing because the status for each of the GitHub actions is “completed” rather than success (I think).


The value of status can be “queued”, “in_progress” or “completed”. We can’t set the value to be others. This is how it’s designed.
Similarly, the value of conclusion can be “success”, “failure”, “cancelled” or “skipped”. We also can’t set the value to be others. This is how it’s designed.

If you want to check whether the status is success, you can try using the property conclusion instead of status.
for example:

  - name: Run test
    id: run-test
    run: npm run test:unit

  - name: Run this step when test success
    if: ${{ == 'success' }}
    run: echo "Run this step when test success"

Hi bright,

This may just be a problem with the marketplace GitHub action called WyriHaximus/github-action-wait-for-status. The reason I asked is because I have two different GitHub actions in separate workflows that needs to be checked by this marketplace action. Not sure if you can just check status across workflows…

I can’t read PHP, but I believe this is the line the action is getting the statuses here: src/GetStatusChecksFromCommits.php#L44-L45. And then this is the checking portion src/StatusCheck/Status.php#L26-L48.

So I can’t be for certain the package is the reason why it’s not working.


Looks like, this action is using the following status API in the code:

You can try them in yourself actions or the workflows.