update ci #185
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 | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- 'master' | |
jobs: | |
docs_healthcheck: | |
name: Docs of validators and filters is up to date | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP Action | |
uses: shivammathur/setup-php@v2 | |
- name: composer setup | |
run: | | |
composer update | |
composer install | |
- name: docs healthcheck | |
run: | | |
php ci/check_filters_docs.php | |
php ci/check_validators_docs.php | |
translations: | |
name: Translations are complete | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP Action | |
uses: shivammathur/setup-php@v2 | |
- name: composer setup | |
run: | | |
composer update | |
composer install | |
- name: translations | |
run: | | |
php ci/check_validators_translations.php | |
test_unit: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php: '7.1' | |
- php: '7.2' | |
- php: '7.3' | |
- php: '7.4' | |
- php: '8.0' | |
- php: '8.1' | |
- php: '8.2' | |
- php: '8.3' | |
- php: '8.4' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup PHP Action | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: run unit tests | |
run: | | |
# create folder for coverage | |
mkdir -p build/logs | |
# use phpunit9 for php8 and phpunit6 for 7.1 to 7.4 | |
composer update | |
# create a lock file | |
composer install | |
composer run-script test | |
# it is enough to upload the coverage once | |
- name: upload coverage | |
if: matrix.php == '7.1' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: php vendor/bin/php-coveralls --exclude-no-stmt --coverage_clover=build/logs/clover.xml -v |