feat(init): This is where it all begins... #2
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: Coverage | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
coverage: | |
name: "Generate code coverage" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
- name: Build package | |
run: composer install --no-interaction --no-progress | |
- name: PHPUnit | |
run: ./vendor/bin/phpunit tests --coverage-clover clover.xml | |
- name: Generate Badge | |
uses: timkrase/phpunit-coverage-badge@v1.2.1 | |
with: | |
coverage_badge_path: output/coverage.svg | |
push_badge: false | |
- name: Push Badge | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./output | |
publish_branch: image-data | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |