With Github actions you can automate some specific tasks and you can execute them on a dedicated environment.
Suppose that you have a Laravel application on a Github repository and you want to execute the test suite (via phpunit) every time you push your code on master branch.
From the Github repository page, click on “Actions”.
On Actions section you can create and manage your workflow.
To create a new workflow, in the action section, click on the “New workflow” button.
Github detects automatically the language and/or the framework used in your application. In this case if you have a Laravel application, you can start from the Laravel workflow template.
This is a very simple configuration but very useful to start quickly.
Click on “Set up this workflow” to select Laravel basic workflow.
A new file “.github/workflow/laravel.yml” is created for you, in your repository. You can change your file in order to accomodate your needs.
If you want to understand better all directives in the file, I suggest you to read my Medium post: https://medium.com/@robertodev/continuous-integration-with-github-actions-and-laravel-6-e6cb9aa5aea9
For now, you can publish your actions clicking on “Start commit” button.
To see your new Workflow, click again on “Actions” tab.
On the left panel you can see the list of your workflows, in this case you will have just one workflow named Laravel.
In the main table you will see the list of workflows executed. The first workflow is the more recent.
If you click on the workflow executed, you can access in the workflow detail page. Selecting the action you can see the log and the list of the steps executed. Green is good , red is bad ;)
Now, every time you push your code on master branch, the test suite will be executed automatically. If the workflow will fail you will be notified with an error and you will receive also an email.
I created also a video tutorial for Github actions + Laravel
Feedbacks are welcome!