]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - .travis.yml
Run CI against PHP 8.0
[github/shaarli/Shaarli.git] / .travis.yml
index c6400eef0faadacced206212fde6a37b24fcdb44..35649e2a76f0aa7ed93e055a5ddc32253bf9e021 100644 (file)
@@ -1,35 +1,34 @@
-sudo: false
-dist: trusty
+dist: bionic
 
 matrix:
   include:
+    # jobs for each supported php version
+    - language: php
+      php: nightly # PHP 8.0
+    - language: php
+      php: 7.4
     - language: php
       php: 7.3
     - language: php
       php: 7.2
     - language: php
       php: 7.1
-    - language: php
-      php: 7.0
-    - language: php
-      php: 5.6
+    # jobs for frontend builds
     - language: node_js
-      node_js: 8
+      node_js: 10
       cache:
         yarn: true
         directories:
           - $HOME/.cache/yarn
-
       install:
         - yarn install
-
       before_script:
         - PATH=${PATH//:\.\/node_modules\/\.bin/}
-
       script:
-        - yarn run build # Just to be sure that the build isn't broken
-        - make eslint
-        - make sasslint
+        - yarn run build # verify successful frontend builds
+        - make eslint # javascript static analysis
+        - make sasslint # linter for SASS syntax
+    # jobs for documentation builds
     - language: python
       python: 3.6
       cache:
@@ -45,7 +44,10 @@ cache:
     - $HOME/.composer/cache
 
 install:
-  - composer install --prefer-dist
+  # install/update composer and php dependencies
+  - if [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then export TRAVIS_PHP_VERSION="8.0.0"; fi
+  - composer config --unset platform && composer config platform.php $TRAVIS_PHP_VERSION
+  - composer update
 
 before_script:
   - PATH=${PATH//:\.\/node_modules\/\.bin/}