This workflow will build your unit tests and check the coding style in your repository when pushing any new changes.
- Download the
install_epitech_actions.sh - Go to the folder you just downloaded it
- Do
chmod +x ./install_epitech_actions.shif you don't have the permission to execute it - Do
./install_epitech_actions.sh <path>to install the workflow to the given path
- Go to your repository on Github
- Click on
Settings(tab with gear icon) - Select
Branchesin the left sidebar - Click
Add classic branch protection rule - In branch name pattern type
main - Check the option
Require status checks to pass before merging - And select all the jobs you want to cancel the commit if failed
- Leave all other options by default
- Click
Createat the bottom
Now Github will automatically cancel your commit if any tests failed (depends on what you put in the select search box before).
In the script there was a automated process of installing your branch protection, but this was only for Github Pro users. I decided to remove it.
Enjoy! 💝