Badge added #73
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: UnitTests and CodeCoverage | |
on: [push] | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Composer dependencies | |
run: composer install | |
- name: Run Testsuite | |
run: vendor/bin/pest | |
code-coverages: | |
runs-on: ubuntu-latest | |
needs: unit-tests | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Composer dependencies | |
run: composer install | |
- name: Run Testsuite | |
run: php -d xdebug.mode=coverage vendor/bin/pest --coverage-clover=coverage.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml |