Simple GitHub action for Criterion unit tests at Epitech
Epitech Criterion Actions is a GitHub action that will automatically launch the unit tests create with Criterion in the same way as the Epitech autocorrector. One the action is incorporated into the project, it will start when chages are sent to the main branch of the project. The results are formatted and sent to a special branch named "epitech-criterion-action" ( see branch on example project )
An example project has been created: MaximePremont/EpitechCriterionActions_Example
README.md of epitech-criterion-actions branch
The criterion unit tests and the project must be organized as indecated in the epitech unit tests documentation.
- Have your Makefile at the root of the repository
- Have a "tests_run" rule that compiles the tests with
-lcriterion
and--coverage
- The test executable must be called "unit_tests"
- The test executable must not be deleted when calling "tests_run" in the makefile
Do not hesitate to take a look at the sample project to see how to correctly build your project and Makefile.
Create a .github/workflows/epitechcriterionactions.yaml
workflow file in your project repository :
on:
push:
branches:
- main
- master
jobs:
execute:
runs-on: ubuntu-20.04
steps:
- uses: MaximePremont/EpitechCriterionActions@master
If you have any questions or problems, you can create an issue.
Do you have the slightest idea or do you want to develop the project? Feel free to contribute ! For this a contribution guide is available.
Do not hesitate to use this GitHub Action for your projects and your reviews !