Add support for intermediary URLs such as EDD #115
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: "Continuous Integration" | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: "CI" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.1" | |
- "7.2" | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
composer-version: ["v2"] | |
phpdotenv-version: ["^4.1", "^5.2"] | |
include: | |
- php-version: "7.1" | |
composer-version: "v1" | |
phpdotenv-version: "^4.1" | |
- php-version: "7.1" | |
composer-version: "v1" | |
phpdotenv-version: "^5.2" | |
- php-version: "7.4" | |
composer-version: "v1" | |
phpdotenv-version: "^5.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
tools: "composer:${{ matrix.composer-version }}" | |
coverage: "xdebug" | |
- name: "Choose Composer 1 version" | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer require "composer/composer:^1.0" --dev --no-update --no-interaction | |
if: "matrix.composer-version == 'v1'" | |
- name: "Choose PHPUnit version" | |
run: | | |
if [ "${{ matrix.php-version }}" = "7.1" ]; then | |
echo "SYMFONY_PHPUNIT_VERSION=7.5" >> $GITHUB_ENV; | |
elif [ "${{ matrix.php-version }}" = "8.0" ]; then | |
echo "SYMFONY_PHPUNIT_VERSION=9.4" >> $GITHUB_ENV; | |
else | |
echo "SYMFONY_PHPUNIT_VERSION=8.5" >> $GITHUB_ENV; | |
fi | |
- name: "Choose PHP Dotenv version" | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer require "vlucas/phpdotenv:${{ matrix.phpdotenv-version }}" --no-update --no-interaction | |
- name: Install PHP 7 dependencies | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --prefer-dist --no-interaction --no-progress | |
if: "matrix.php-version < 8" | |
- name: Install PHP 8 dependencies | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --prefer-dist --no-interaction --no-progress --ignore-platform-req=php | |
if: "matrix.php-version >= 8" | |
- name: "Run PHP_CodeSniffer" | |
run: "composer cs-check" | |
if: "matrix.composer-version == 'v2' && matrix.php-version == '7.4'" | |
- name: "Run unit test suite and collect coverage data" | |
run: "composer test-unit-coverage" | |
if: "matrix.composer-version == 'v1' || matrix.php-version == '7.4'" | |
- name: "Run unit test suite" | |
run: "composer test-unit" | |
if: "matrix.composer-version != 'v1' && matrix.php-version != '7.4'" | |
- name: "Run integration test suite" | |
run: "composer test-integration" | |
- name: "Upload intermediate results to Coveralls" | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: php-${{ matrix.php-version }}_composer-${{ matrix.composer-version }}_phpdotenv-${{ matrix.phpdotenv-version }} | |
COVERALLS_PARALLEL: true | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls --coverage_clover=clover.xml --json_path coveralls-upload.json -v | |
if: "matrix.composer-version == 'v1' || matrix.php-version == '7.4'" | |
finish: | |
name: "Coverage" | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Merge intermediate results and finalize Coveralls report" | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |