Workflows - GitHub Waiting for status to be reported, on skipped builds


#1

I have a workflow setup that works very nicely for our master branch.

We have a trunk based deployment, so we want to build all PRs and master, but when it is master we deploy the code when the tests pass.

workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - deploy-to-staging:
          requires:
            - build
          filters:
            branches:
              only: master
      - approve-deploy-production:
          type: approval
          requires:
            - deploy-to-staging
      - deploy-to-prod:
          requires:
            - approve-deploy-production

So the deploy to staging step is only being executed on master. The problem comes in with the PR branches, we are stopping the pipleline after the build step, The status on GitHub stays ‘Waiting for status to be reported’ so the pipeline never finishes. How should we fix this?


#2

Just wanted to share this here. I managed to solve this problem on GitHub by selecting the checks I need for the master branch.


#3

I’m also seeing this with a workflow (not sure if it’s relevant that the branch I’m pushing to was previously on CircleCI 1.0. By the looks of it you are not requiring other jobs in your workflow to pass, this doesn’t seem like a solution. I would hope to require all jobs pass by default (and would hope the top-level ci/circleci job would do this), otherwise at any point we restructure the workflow we will have to go in and manually require jobs if there is any change. Given that you are basically forced to use workflows if you want to filter/trigger on tags and share a checkout this doesn’t seem ideal.


#4

Thanks for posting your solution. This cleared up our issue immediately! Thanks!


#5

The proposed solution does not work for me.
Still a pain.
Really annoying.


#6