Add support for intermediary URLs such as EDD #119
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 (${{ matrix.php-version }}, ${{ matrix.composer-version }}, ${{ matrix.phpdotenv-version }})" | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
php-version: | |
- "7.1" | |
- "7.2" | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
composer-version: ["v2"] | |
phpdotenv-version: ["^4.1", "^5.2"] | |
experimental: [false] | |
include: | |
- php-version: "7.1" | |
composer-version: "v1" | |
phpdotenv-version: "^4.1" | |
experimental: false | |
- php-version: "7.1" | |
composer-version: "v1" | |
phpdotenv-version: "^5.2" | |
experimental: false | |
- php-version: "7.4" | |
composer-version: "v1" | |
phpdotenv-version: "^5.2" | |
experimental: false | |
- php-version: "8.4" | |
composer-version: "v2" | |
phpdotenv-version: "^5.2" | |
experimental: true | |
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 dependencies | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --prefer-dist --no-interaction --no-progress | |
- 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 |