Merge pull request #84 from eivydas/path-and-url #38
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: "Test" | |
on: | |
pull_request: | |
branches: | |
- "master" | |
push: | |
branches: | |
- "master" | |
jobs: | |
unit-tests: | |
name: "Unit Tests" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
- "8.1" | |
- "8.0" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
ini-values: zend.assertions=1,assert.exception=1 | |
- name: "Install dependencies" | |
run: "composer update --no-interaction" | |
- name: "Run tests" | |
run: "vendor/bin/phpunit" | |
coverage: | |
name: "Publish coverage" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "8.0" | |
tools: "composer:v2" | |
ini-values: zend.assertions=1,assert.exception=1 | |
- name: "Install dependencies" | |
run: "composer update --no-interaction" | |
- name: "Install coveralls" | |
run: "composer require --dev php-coveralls/php-coveralls:^2.0 --with-all-dependencies" | |
- name: "Generate coverage" | |
run: "vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml --configuration ./phpunit.xml.dist" | |
- name: "Publish coverage" | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: "vendor/bin/php-coveralls -v" | |
coding-standard: | |
name: "Coding standard" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "8.0" | |
tools: "composer:v2" | |
- name: "Install dependencies" | |
run: "composer update --no-interaction" | |
- name: "Check coding standard" | |
run: "vendor/bin/php-cs-fixer fix -v --diff --dry-run" |