Replace php-coveralls with official Coveralls GH action #683
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: Tests and linting | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['7.3', '7.4', '8.0', '8.1'] | |
dependencies: [''] | |
include: | |
- { php-version: '7.3', dependencies: '--prefer-lowest --prefer-stable' } | |
name: PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} | |
steps: | |
- name: Dump COVERALLS_SERVICE_NUMBER | |
run: echo $COVERALLS_SERVICE_NUMBER | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl, zip | |
coverage: xdebug | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer update --no-progress ${{ matrix.dependencies }} | |
- name: Run tests | |
run: vendor/bin/phpunit --coverage-clover coverage-clover.xml | |
- name: Submit coverage to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CI_BUILD_NUMBER: ${{ github.run_id }}-${{ github.run_attempt }} | |
run: | | |
echo $CI_BUILD_NUMBER | |
composer global require --no-progress --dev php-coveralls/php-coveralls | |
~/.composer/vendor/bin/php-coveralls -v | |
codestyle: | |
name: "Code style and static analysis" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: mbstring, intl | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer update --no-progress | |
- name: Lint | |
run: composer lint | |
- name: Run checks | |
run: composer analyze | |
markdown-link-check: | |
name: "Markdown link check" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
use-verbose-mode: 'yes' |