Update orchestra/testbench requirement from ^3.5|^6.0|^4.0|^7.0|^8.0 to ^3.5|^6.0|^4.0|^7.0|^8.0|^9.0 #203
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- edited | |
- synchronize | |
- labeled | |
- assigned | |
- unlabeled | |
- unlocked | |
- review_requested | |
- review_request_removed | |
- unassigned | |
env: | |
COVERAGE: '1' | |
php_extensions: 'apcu, bcmath, ctype, curl, dom, iconv, intl, json, mbstring, opcache, openssl, pdo, pdo_pgsql, pcntl, pcov, posix, redis, session, simplexml, sockets, tokenizer, xml, xmlwriter, zip' | |
key: cache-v0.1 | |
DB_USER: 'postgres' | |
DB_NAME: 'testing' | |
DB_PASSWORD: 'postgres' | |
DB_HOST: '127.0.0.1' | |
jobs: | |
lint: | |
runs-on: '${{ matrix.operating_system }}' | |
timeout-minutes: 20 | |
strategy: | |
matrix: | |
operating_system: | |
- ubuntu-latest | |
php_versions: | |
- '7.4' | |
fail-fast: false | |
env: | |
PHP_CS_FIXER_FUTURE_MODE: '0' | |
name: 'Lint PHP' | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v2 | |
- name: 'Setup cache environment' | |
id: cache-env | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: '${{ matrix.php_versions }}' | |
extensions: '${{ env.php_extensions }}' | |
key: '${{ env.key }}' | |
- name: 'Cache extensions' | |
uses: actions/cache@v1 | |
with: | |
path: '${{ steps.cache-env.outputs.dir }}' | |
key: '${{ steps.cache-env.outputs.key }}' | |
restore-keys: '${{ steps.cache-env.outputs.key }}' | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
extensions: '${{ env.php_extensions }}' | |
ini-values: memory_limit=-1 | |
tools: pecl, composer | |
coverage: none | |
- name: 'Setup problem matchers for PHP (aka PHP error logs)' | |
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: 'Install PHP dependencies with Composer' | |
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | |
working-directory: './' | |
- name: 'Linting PHP source files' | |
run: 'vendor/bin/ecs check --config=ecs.php .' | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
coverage: [false] | |
exclude_group: ['WithoutSchema,forPHP8'] | |
experimental: [false] | |
operating_system: [ubuntu-latest] | |
postgres: ['10', '11', '12'] | |
php_versions: ['7.3', '7.4'] | |
include: | |
- operating_system: 'ubuntu-latest' | |
php_versions: '7.3' | |
postgres: '9.6' | |
experimental: false | |
coverage: true | |
exclude_group: WithoutSchema,forPHP8 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '7.3' | |
postgres: '13' | |
experimental: false | |
coverage: false | |
exclude_group: WithoutSchema,forPHP8 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '7.4' | |
postgres: '13' | |
experimental: false | |
coverage: false | |
exclude_group: WithoutSchema,forPHP8 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '8.0' | |
postgres: '10' | |
experimental: false | |
coverage: false | |
exclude_group: WithoutSchema,forPHP7 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '8.0' | |
postgres: '11' | |
experimental: false | |
coverage: false | |
exclude_group: WithoutSchema,forPHP7 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '8.0' | |
postgres: '12' | |
experimental: false | |
coverage: true | |
exclude_group: WithoutSchema,forPHP7 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '8.0' | |
postgres: '13' | |
coverage: false | |
experimental: false | |
exclude_group: WithoutSchema,forPHP7 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '8.1' | |
postgres: '14' | |
coverage: false | |
experimental: false | |
exclude_group: WithoutSchema,forPHP7 | |
- operating_system: 'ubuntu-latest' | |
php_versions: '8.2' | |
postgres: '15' | |
coverage: false | |
experimental: false | |
exclude_group: WithoutSchema,forPHP7 | |
runs-on: '${{ matrix.operating_system }}' | |
services: | |
postgres: | |
image: 'postgres:${{ matrix.postgres }}' | |
env: | |
POSTGRES_USER: ${{ env.DB_USER }} | |
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} | |
POSTGRES_DB: ${{ env.DB_NAME }} | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
name: 'Test / PHP ${{ matrix.php_versions }} / Postgres ${{ matrix.postgres }}' | |
needs: | |
- lint | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: apt-get | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libpq-dev postgresql-client | |
- name: 'Setup cache environment' | |
id: cache-env | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
extensions: ${{ env.php_extensions }} | |
key: '${{ env.key }}' | |
- name: 'Cache extensions' | |
uses: actions/cache@v1 | |
with: | |
path: '${{ steps.cache-env.outputs.dir }}' | |
key: '${{ steps.cache-env.outputs.key }}' | |
restore-keys: '${{ steps.cache-env.outputs.key }}' | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
extensions: ${{ env.php_extensions }} | |
ini-values: 'pcov.directory=src, date.timezone=UTC, upload_max_filesize=20M, post_max_size=20M, memory_limit=512M, short_open_tag=Off' | |
coverage: pcov | |
tools: 'phpunit' | |
- name: 'Install PHP dependencies with Composer' | |
continue-on-error: ${{ matrix.experimental }} | |
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | |
working-directory: './' | |
- name: 'Run Unit Tests with PHPUnit' | |
continue-on-error: ${{ matrix.experimental }} | |
run: | | |
sed -e "s/\${USERNAME}/${{ env.DB_USER }}/" \ | |
-e "s/\${PASSWORD}/${{ env.DB_PASSWORD }}/" \ | |
-e "s/\${DATABASE}/${{ env.DB_NAME }}/" \ | |
-e "s/\${HOST}/${{ env.DB_HOST }}/" \ | |
phpunit.xml.dist > phpunit.xml | |
./vendor/bin/phpunit \ | |
--stderr \ | |
--exclude-group ${{ matrix.exclude_group }} \ | |
--coverage-clover build/logs/clover.xml \ | |
--coverage-text | |
working-directory: './' | |
- name: Upload coverage results to Coveralls | |
if: ${{ !matrix.experimental && matrix.coverage }} | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: php-${{ matrix.php_versions }}-postgres-${{ matrix.postgres }} | |
run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
name: "Code coverage" | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |