Add reference normalize to path parameters on top level #100
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
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | |
name: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
jobs: | |
tests: | |
name: "PHP Tests" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php-version: "8.1" | |
composer-deps: lowest | |
- php-version: "8.1" | |
composer-deps: latest | |
with-cs-check: true | |
- php-version: "8.2" | |
composer-deps: latest | |
- php-version: "8.3" | |
composer-deps: latest | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
php-version: "${{ matrix.php-version }}" | |
tools: composer:v2 | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: "Cache dependencies" | |
uses: "actions/cache@v2" | |
with: | |
path: "~/.composer/cache" | |
key: "php-${{ matrix.php-version }}-composer-${{ matrix.composer-deps }}-${{ hashFiles('**/composer.json') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.composer-deps }}" | |
- name: "Install dependencies" | |
run: "composer install --no-interaction --no-progress --ignore-platform-reqs" | |
- name: "Update dependencies (lowest)" | |
run: "composer update --no-interaction --no-progress --prefer-lowest --prefer-stable" | |
if: ${{ matrix.composer-deps == 'lowest' }} | |
- name: "Update dependencies (latest)" | |
run: "composer update --no-interaction --no-progress --no-suggest" | |
if: ${{ matrix.composer-deps == 'latest' }} | |
- name: "Show dependencies" | |
run: "composer show" | |
- name: "Run code style check" | |
run: "composer run-script cs-check" | |
if: ${{ matrix.with-cs-check == true }} | |
- name: "Run CI" | |
run: "composer run-script phpunit" | |
tests-with-coverage: | |
name: "Tests with coverage and PR Comments" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "8.3" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "xdebug" | |
php-version: "${{ matrix.php-version }}" | |
ini-values: zend.assertions=1 | |
tools: composer:v2 | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: "Cache dependencies" | |
uses: "actions/cache@v2" | |
with: | |
path: "~/.composer/cache" | |
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-" | |
- name: "Install dependencies" | |
run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-reqs" | |
- name: "Update dependencies (latest)" | |
run: "composer update --no-interaction --no-progress --no-suggest" | |
- name: "Show dependencies" | |
run: "composer show" | |
- name: "Run CI with coverage" | |
env: | |
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | |
run: "composer run-script ci-coverage" | |
- name: Codecov | |
uses: codecov/codecov-action@v1.0.15 | |
with: | |
directory: ./build/coverage/ | |
- name: Run Infection for added files | |
if: ${{ github.base_ref != '' }} | |
run: | | |
git fetch --depth=1 origin $GITHUB_BASE_REF | |
composer run-script infection -- --git-diff-filter=AM --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered | |
- name: Run PHPStan | |
run: composer run-script phpstan -- --error-format=github | |
test-runs-on-docker: | |
name: "Test if tests pass in the Docker container" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Test Dockerfile | |
uses: ./.github/actions/validate-dockerfile |