language: php
php:
  - 8.0
  - 8.1

addons:
  chrome: stable

before_install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && (cd && source ~/.nvm/nvm.sh) && nvm install

install:
  - cp .env.travis .env
  - rm .env.testing
  - travis_retry php composer.phar install --no-interaction --prefer-dist --no-suggest
  - php artisan key:generate
  - touch database/database.sqlite
  - chmod a+w database/database.sqlite
  - php artisan migrate
  - php artisan dusk:chrome-driver
  - nvm use
  - npm install
  - npm run prod

before_script:
  - php artisan serve &
  - sleep 2 # give the PHP server time to start

script: 
  - php artisan test


language: php
dist: bionic
php:
  - 8.0
  - 8.1.0

addons:
  chrome: stable

before_install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && (cd && source ~/.nvm/nvm.sh) && nvm install

install:
  - cp .env.travis .env
  - rm .env.testing
  - travis_retry php composer.phar install --no-interaction --prefer-dist --no-suggest
  - php artisan key:generate
  - touch database/database.sqlite
  - chmod a+w database/database.sqlite
  - php artisan migrate
  - php artisan dusk:chrome-driver
  - nvm use
  - npm install
  - npm run prod

before_script:
  - php artisan serve &
  - sleep 2 # give the PHP server time to start

script: 
  - php artisan test


Update Travis CI config for PHP 8.1
Update Travis CI config for PHP 8.1

A forum post said specifying 8.1.0 on bionic might work.
https://travis-ci.community/t/php-8-1-support/12439/21
