Test Kitchen GitHub Action Ignoring Local Chef Config

Hello. I'm using the test-kitchen GitHub Action and am running into trouble with chef-cli not using my local Chef config.

When I run knife config show in a step before the Test Kitchen action, it correctly finds my config at .chef/config.rb. However, when Test Kitchen runs, chef-cli ignores this config, causing it to look for my client key at /etc/chef/client.pem instead of the location specified in my config.

This results in the following error

Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/client.pem>

We've tried symlinking the config.rb file to ~/.chef/config.rb :
mkdir -p ~/.chef && ln -svf .chef/config.rb ~/.chef/config.rb

but got the same results.

Has anyone had a similar issue or does anyone know how to make the Test Kitchen action use the local chef config? Thank you!

what chef-cli command are you trying to run?

It is the chef-cli install command within the test-kitchen action

Resolved by adding a step before the test-kitchen action to create a wrapper that makes kitchen [args] execute chef exec kitchen [args]