π PATCH op tab name #114
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI: Tests" | |
on: | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
project_tests: | |
name: "β Project tests" | |
runs-on: ubuntu-latest | |
container: | |
image: epitechcontent/epitest-docker:latest | |
continue-on-error: false | |
timeout-minutes: 3 | |
strategy: | |
matrix: | |
type: ['tests_criterion', 'ftest', 'tests_custom'] | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "βοΈ Run ${{ matrix.type }}" | |
run: make ${{ matrix.type }} | |
project_coverage: | |
name: "π Project coverage" | |
runs-on: ubuntu-latest | |
permissions: write-all | |
container: | |
image: epitechcontent/epitest-docker:latest | |
needs: [ project_tests ] | |
timeout-minutes: 3 | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "βοΈ Run tests with Epitech rule" | |
run: make tests_criterion | |
- name: "βοΈ Run lines coverage" | |
id: lines_coverage | |
run: | | |
echo 'lines_coverage<<EOF' >> $GITHUB_OUTPUT | |
make coverage >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
- name: "βοΈ Run branch coverage" | |
id: branch_coverage | |
run: | | |
echo 'branch_coverage<<EOF' >> $GITHUB_OUTPUT | |
make coverage_branch >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
- name: "π¬ Display coverage" | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
### π Coverage report @${{ github.event.pull_request.assignee.login }} | |
<details> | |
<summary>Lines coverage</summary> | |
<pre> | |
${{ steps.lines_coverage.outputs.lines_coverage }} | |
</pre> | |
</details> | |
<details> | |
<summary>Branches coverage</summary> | |
<pre> | |
${{ steps.branch_coverage.outputs.branch_coverage }} | |
</pre> | |
</details> |