I look through the Codeception files and I see .gitkeep in the tests/_data/ directory. That is the directory that should hold a database dump. That dump is the database from which the site will be restored. That same directory also, upon initialization, contains a .gitkeep file which indicates to me that the directory "should be committed, but there isn't anything in it right now". Now, I'm not going to commit my database to my repo, but should that one file be ignored or should the whole directory be ignored? Are there other files are directories that should be ignored? Is there a best-practice to follow when working with .git and automated tests?
Besides ignoring tests/_support/_generated, you should also ignore tests/_output , since that output is generated when running the tests.
And, if you are using for example Laravel style .env configuration files, you probably want to ignore the .env file as well.
Using .env files you can also commit codeception's .yml config files, because anything that would be different across environments would be defined in the .env.
Of course, you need to commit your database dump too, if you use one. Like Naktibalda said, it should only contain necessary data. But there are many other ways to setup you test database with the necessary data, besides using a full dump.
Besides that, I also commit codecept.phar, chromedriver and selenium to our project. It makes it easier for the team that they can pull the project and run the tests immediately with the correct versions of those binaries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With