Merge pull request #20 from janu-software/php84 #226
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: | |
pull_request: | |
push: | |
branches: ["*"] | |
schedule: | |
- cron: "0 8 * * 1" | |
jobs: | |
test80: | |
runs-on: ubuntu-latest | |
name: PHPUnit | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Setup PHP cache environment" | |
id: "extcache" | |
uses: "shivammathur/cache-extensions@v1" | |
with: | |
php-version: "8.1" | |
extensions: "pcov" | |
key: "v1" | |
- name: "Cache PHP extensions" | |
uses: "actions/cache@v2" | |
with: | |
path: "${{ steps.extcache.outputs.dir }}" | |
key: "${{ steps.extcache.outputs.key }}" | |
restore-keys: "${{ steps.extcache.outputs.key }}" | |
- name: Setup PHP with PCOV | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
coverage: "pcov" | |
- name: "Setup problem matchers for PHP" | |
shell: "bash" | |
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' | |
- name: "Composer" | |
run: "composer install --prefer-dist --no-progress --no-suggest" | |
- name: "Run PHPUnit" | |
run: "make coverage" | |
- name: "Coveralls.io" | |
env: | |
CI_NAME: github | |
CI: true | |
COVERALLS_REPO_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
run: | | |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.1/php-coveralls.phar | |
php php-coveralls.phar --verbose --config tests/.coveralls.yml |