Skip to content

run-tests

run-tests #517

Workflow file for this run

name: run-tests
on:
push:
# branches: [ "master" ]
pull_request:
# branches: [ "master" ]
schedule:
- cron: "0 0 * * 0"
permissions:
contents: read
jobs:
vlucas-phpdotenv-php83-82-81-80:
name: "PHP${{ matrix.php }} vlucas/phpdotenv ${{ matrix.vlucas-phpdotenv }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
php: [ "8.3", "8.2", "8.1", "8.0" ]
vlucas-phpdotenv: [ "^5.0", "^4.1.5", "^3.6.4", "^2.0", "^1.1.0" ]
dependency-prefer: [ "prefer-stable", "prefer-lowest" ]
include:
- php: "8.3"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.2"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.2"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.1"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.0"
phpunit: "^9.3"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- os: "ubuntu-latest"
os-title: "ubuntu"
- os: "macos-latest"
os-title: "macos"
- os: "windows-latest"
os-title: "win"
- dependency-prefer: "prefer-stable"
dependency-prefer-title: "stable"
- dependency-prefer: "prefer-lowest"
dependency-prefer-title: "lowest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: mbstring
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# find composer's cache directory - so we know which directory to cache in the next step
- name: "Find composer's cache directory"
id: "composer-cache"
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: "Cache composer's cache directory"
uses: "actions/cache@v3"
with:
path: "${{ steps.composer-cache.outputs.composer_cache_dir }}"
key: "[${{ matrix.os }}][php-${{ matrix.php }}][vlucas/phpdotenv-${{ matrix.vlucas-phpdotenv }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: "Install dependencies"
uses: "nick-fields/retry@v2"
with:
timeout_minutes: 5
max_attempts: 5
shell: bash # make sure "^" characters are interpreted properly on Windows (e.g. in "^5.0")
command: |
composer remove "infection/infection" --dev --no-interaction --no-update
composer remove "phpcsstandards/php_codesniffer" --dev --no-interaction --no-update
composer remove "phpstan/phpstan" --dev --no-interaction --no-update
composer require "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer require "vlucas/phpdotenv:${{ matrix.vlucas-phpdotenv }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: "Execute tests"
run: vendor/bin/phpunit "--configuration=${{ matrix.phpunit-config-file }}" --no-coverage --stop-on-error --stop-on-failure
vlucas-phpdotenv-php74-73-72-71-70:
name: "PHP${{ matrix.php }} vlucas/phpdotenv ${{ matrix.vlucas-phpdotenv }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
php: [ "7.4", "7.3", "7.2", "7.1", "7.0" ]
vlucas-phpdotenv: [ "^5.0", "^4.1.5", "^3.6.4", "^2.0", "^1.1.0" ]
dependency-prefer: [ "prefer-stable", "prefer-lowest" ]
include:
- php: "7.4"
phpunit: "^9.3"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.3"
phpunit: "^9.3"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.2"
phpunit: "^8.0"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.1"
phpunit: "^7.0"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.0"
phpunit: "^6.0"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- os: "ubuntu-latest"
os-title: "ubuntu"
- os: "macos-latest"
os-title: "macos"
- os: "windows-latest"
os-title: "win"
- dependency-prefer: "prefer-stable"
dependency-prefer-title: "stable"
- dependency-prefer: "prefer-lowest"
dependency-prefer-title: "lowest"
exclude:
- php: "7.0"
vlucas-phpdotenv: "^5.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: mbstring
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# find composer's cache directory - so we know which directory to cache in the next step
- name: "Find composer's cache directory"
id: "composer-cache"
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: "Cache composer's cache directory"
uses: "actions/cache@v3"
with:
path: "${{ steps.composer-cache.outputs.composer_cache_dir }}"
key: "[${{ matrix.os }}][php-${{ matrix.php }}][vlucas/phpdotenv-${{ matrix.vlucas-phpdotenv }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: "Install dependencies"
uses: "nick-fields/retry@v2"
with:
timeout_minutes: 5
max_attempts: 5
shell: bash # make sure "^" characters are interpreted properly on Windows (e.g. in "^5.0")
command: |
composer remove "infection/infection" --dev --no-interaction --no-update
composer remove "phpcsstandards/php_codesniffer" --dev --no-interaction --no-update
composer remove "phpstan/phpstan" --dev --no-interaction --no-update
composer require "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer require "vlucas/phpdotenv:${{ matrix.vlucas-phpdotenv }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: "Execute tests"
run: vendor/bin/phpunit "--configuration=${{ matrix.phpunit-config-file }}" --no-coverage --stop-on-error --stop-on-failure
symfony-dotenv-php83-82-81-80:
name: "PHP${{ matrix.php }} symfony/dotenv ${{ matrix.symfony-dotenv }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
php: [ "8.3", "8.2", "8.1", "8.0" ]
symfony-dotenv: [ "^7.0", "^6.0", "^5.0", "^4.0", "^3.3" ]
dependency-prefer: [ "prefer-stable", "prefer-lowest" ]
include:
- php: "8.3"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.2"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.2"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.1"
phpunit: "^10.1.0"
phpunit-config-file: "phpunit.github-actions.xml.dist"
- php: "8.0"
phpunit: "^9.3"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- os: "ubuntu-latest"
os-title: "ubuntu"
- os: "macos-latest"
os-title: "macos"
- os: "windows-latest"
os-title: "win"
- dependency-prefer: "prefer-stable"
dependency-prefer-title: "stable"
- dependency-prefer: "prefer-lowest"
dependency-prefer-title: "lowest"
exclude:
- php: "8.1"
symfony-dotenv: "^7.0"
- php: "8.0"
symfony-dotenv: "^7.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: mbstring
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# find composer's cache directory - so we know which directory to cache in the next step
- name: "Find composer's cache directory"
id: "composer-cache"
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: "Cache composer's cache directory"
uses: "actions/cache@v3"
with:
path: "${{ steps.composer-cache.outputs.composer_cache_dir }}"
key: "[${{ matrix.os }}][php-${{ matrix.php }}][symfony/dotenv-${{ matrix.symfony-dotenv }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: "Install dependencies"
uses: "nick-fields/retry@v2"
with:
timeout_minutes: 5
max_attempts: 5
shell: bash # make sure "^" characters are interpreted properly on Windows (e.g. in "^5.0")
command: |
composer remove "infection/infection" --dev --no-interaction --no-update
composer remove "phpcsstandards/php_codesniffer" --dev --no-interaction --no-update
composer remove "phpstan/phpstan" --dev --no-interaction --no-update
composer require "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer require "symfony/dotenv:${{ matrix.symfony-dotenv }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: "Execute tests"
run: vendor/bin/phpunit "--configuration=${{ matrix.phpunit-config-file }}" --no-coverage --stop-on-error --stop-on-failure
symfony-dotenv-php74-73-72-71-70:
name: "PHP${{ matrix.php }} symfony/dotenv ${{ matrix.symfony-dotenv }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
php: [ "7.4", "7.3", "7.2", "7.1", "7.0" ]
symfony-dotenv: [ "^7.0", "^6.0", "^5.0", "^4.0", "^3.3" ]
dependency-prefer: [ "prefer-stable", "prefer-lowest" ]
include:
- php: "7.4"
phpunit: "^9.3"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.3"
phpunit: "^9.3"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.2"
phpunit: "^8.0"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.1"
phpunit: "^7.0"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- php: "7.0"
phpunit: "^6.0"
phpunit-config-file: "phpunit.github-actions.up-to-9.xml.dist"
- os: "ubuntu-latest"
os-title: "ubuntu"
- os: "macos-latest"
os-title: "macos"
- os: "windows-latest"
os-title: "win"
- dependency-prefer: "prefer-stable"
dependency-prefer-title: "stable"
- dependency-prefer: "prefer-lowest"
dependency-prefer-title: "lowest"
exclude:
- php: "7.4"
symfony-dotenv: "^7.0"
- php: "7.4"
symfony-dotenv: "^6.0"
- php: "7.3"
symfony-dotenv: "^7.0"
- php: "7.3"
symfony-dotenv: "^6.0"
- php: "7.2"
symfony-dotenv: "^7.0"
- php: "7.2"
symfony-dotenv: "^6.0"
- php: "7.1"
symfony-dotenv: "^7.0"
- php: "7.1"
symfony-dotenv: "^6.0"
- php: "7.1"
symfony-dotenv: "^5.0"
- php: "7.0"
symfony-dotenv: "^7.0"
- php: "7.0"
symfony-dotenv: "^6.0"
- php: "7.0"
symfony-dotenv: "^5.0"
- php: "7.0"
symfony-dotenv: "^4.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: mbstring
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# find composer's cache directory - so we know which directory to cache in the next step
- name: "Find composer's cache directory"
id: "composer-cache"
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: "Cache composer's cache directory"
uses: "actions/cache@v3"
with:
path: "${{ steps.composer-cache.outputs.composer_cache_dir }}"
key: "[${{ matrix.os }}][php-${{ matrix.php }}][symfony/dotenv-${{ matrix.symfony-dotenv }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: "Install dependencies"
uses: "nick-fields/retry@v2"
with:
timeout_minutes: 5
max_attempts: 5
shell: bash # make sure "^" characters are interpreted properly on Windows (e.g. in "^5.0")
command: |
composer remove "infection/infection" --dev --no-interaction --no-update
composer remove "phpcsstandards/php_codesniffer" --dev --no-interaction --no-update
composer remove "phpstan/phpstan" --dev --no-interaction --no-update
composer require "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer require "symfony/dotenv:${{ matrix.symfony-dotenv }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: "Execute tests"
run: vendor/bin/phpunit "--configuration=${{ matrix.phpunit-config-file }}" --no-coverage --stop-on-error --stop-on-failure