language: php

services:
  - mysql

php:
  - 5.6
  - 7.2
  - 7.3
  - 7.4

install: composer install

before_script:
  - composer validate --strict
  - mysql -e 'CREATE DATABASE wp_cli_test;' -uroot
  - mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot

script: composer test

cache:
  directories:
    - $HOME/.cache/composer

before_deploy:
  - openssl aes-256-cbc -K $encrypted_70f7c684b483_key -iv $encrypted_70f7c684b483_iv -in deploy/key.enc -out deploy/key -d

deploy:
  provider: script
  script: bash deploy/deploy-plugin.sh
  skip_cleanup: true
  on:
    condition: [[ $TRAVIS_TAG == server-* ]]
    tags: true
    php: 7.4

language: php

services:
  - mysql

php:
  - 5.6
  - 7.2
  - 7.3
  - 7.4
  - 8.0

install: composer install

before_script:
  - composer validate --strict
  - mysql -e 'CREATE DATABASE wp_cli_test;' -uroot
  - mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot

script: composer test

cache:
  directories:
    - $HOME/.cache/composer

before_deploy:
  - openssl aes-256-cbc -K $encrypted_70f7c684b483_key -iv $encrypted_70f7c684b483_iv -in deploy/key.enc -out deploy/key -d

deploy:
  provider: script
  script: bash deploy/deploy-plugin.sh
  skip_cleanup: true
  on:
    condition: [[ $TRAVIS_TAG == server-* ]]
    tags: true
    php: 7.4

Add PHP 8 to test matrix
Add PHP 8 to test matrix
