Testing Config Files Locally

Hi there,

I’m looking to test a locally-modified config.yml to avoid polluting the git log with my attempts, but it seems that both of the documented solutions don’t support workflows:

https://circleci.com/docs/2.0/examples/#section=configuration

https://circleci.com/docs/2.0/local-cli/

However, in the API docs I found a new API call: https://circleci.com/docs/api/#trigger-a-new-build-by-project-preview

It states “Workflows will be run or scheduled in the same way as when a webhook from source control is received.” This looks like what I needed!

However, when I make an API call to this endpoint, I get the following error:

“Unexpected parameter(s): :config, :notify”

So it seems this new endpoint doesn’t allow the local config to be included in the POST. Is there any way this could be allowed? Or is there some other way to do what I want?

Thanks!

It would probably be easier to clone your repo, make as many pushes as you need to get that working, then rebase all your changes into one commit on the main repo.

Or use a branch on the main repo, then throw the branch away after you’ve squashed the changes onto master - though that will leave a trail of failed builds in your CI history.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

This feature is now available through our VS Code extension: Introducing the ability to test run config.yml changes from VS Code (Open Preview)