Shelob9 / actions-test

0 stars 0 forks source link

Github action for tests #1

Closed Shelob9 closed 4 years ago

Shelob9 commented 4 years ago
Shelob9 commented 4 years ago

My thaughts on yesterday's learning experience: This would work for unit tests without database: https://kirschbaumdevelopment.com/news-articles/using-github-actions-to-setup-ci-cd-with-laravel-and-mysql

I'm not worried about deprecation warnings. It doesn't provide database, that's the the issue. We could add MYSQL. https://github.com/marketplace/actions/setup-mysql I tried that here: https://github.com/Shelob9/actions-test/actions/runs/154499377 and couldn't make it work. This was probably worth continuing.

Then I went and looked at the Github actions on a Laravel app I had worked on and saw that docker-compose works out of the box. Which is intresting -- CF core and email-crm have docker-compose setups that can run phpunit integration tests and pressumably we could add similar docker-compose setup to NF core. See: https://git.saturdaydrive.io/_/ninja-forms/ninja-forms/issues/4271

So I think that createing a docker-compose for repos that don't have one that can a) provide local WordPress site and b) run all types of tests is step one and then use that docker-compose setup in CI to run tests. I do wonder if Lando makes more sense then docker-compose.yml as a way to orchestrate docker with docker-compose.