Update composer.json. #476
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: Cyr2Lat CI | |
on: [ push, pull_request ] | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
php-version: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] | |
name: PHP ${{ matrix.php-version }} on ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Composer caching | |
uses: ramsey/composer-install@v2 | |
- name: Install dependencies and update PHPUnit | |
run: | | |
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | |
composer install | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run code sniffer | |
run: vendor/bin/phpcs --colors | |
- name: Run PHPUnit tests | |
if: ${{ matrix.php-version != '7.4' }} | |
run: vendor/bin/phpunit | |
- name: Run PHPUnit tests with coverage | |
if: ${{ matrix.php-version == '7.4' }} | |
run: vendor/bin/phpunit --coverage-clover coverage.xml | |
- name: Run Coveralls for PHPUnit tests | |
if: ${{ matrix.php-version == '7.4' }} | |
env: | |
COVERALLS_RUN_LOCALLY: true | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: vendor/bin/php-coveralls -v | |
- name: Run JEST with coverage and Coveralls | |
if: ${{ matrix.php-version == '8.2' }} | |
env: | |
COVERALLS_RUN_LOCALLY: true | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: | | |
yarn set version stable | |
yarn | |
yarn run dev | |
yarn run coveralls |