Pico/.travis.yml
2019-11-04 01:49:03 +01:00

76 lines
1.8 KiB
YAML

dist: trusty
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache/files
jobs:
include:
# Test stage
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: nightly
- php: hhvm-3.27 # until Sep 2019
- php: hhvm-3.30 # until Nov 2019
# Branch deployment stage
- stage: deploy-branch
if: type == "push" && tag IS blank
php: 5.6
sudo: required
install:
- '[[ ",$DEPLOY_PHPDOC_BRANCHES," == *,"$TRAVIS_BRANCH",* ]] || travis_terminate 0'
- install.sh --deploy
script:
- deploy-branch.sh
# Release deployment stage
- stage: deploy-release
if: tag IS present
php: 5.3
dist: precise
install:
- install.sh --deploy
script:
- '[ "$PROJECT_REPO_TAG" == "v$(php -r "require_once(\"lib/Pico.php\"); echo Pico::VERSION;")" ]'
- deploy-release.sh
before_deploy:
- release.sh "$PROJECT_REPO_TAG"
deploy:
provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file:
- pico-release-$PROJECT_REPO_TAG.tar.gz
- pico-release-$PROJECT_REPO_TAG.zip
skip_cleanup: true
name: Version ${PROJECT_REPO_TAG:1}
draft: true
on:
tags: true
# Ignore nightly build failures
allow_failures:
- php: nightly
fast_finish: true
before_install:
- export PICO_TOOLS_DIR="$HOME/__picocms_tools"
- git clone --branch="$TOOLS_REPO_BRANCH" "https://github.com/$TOOLS_REPO_SLUG.git" "$PICO_TOOLS_DIR"
- . "$PICO_TOOLS_DIR/init/travis.sh.inc"
- . "$PICO_PROJECT_DIR/.build/init.sh.inc"
install:
- install.sh
script:
- phpcs --standard=.phpcs.xml "$PICO_PROJECT_DIR"