Pico/.travis.yml
Daniel Rudolf 41fc15a7e8
Remove picocms\Pico\ namespace
This reverts commit 812ae5c215
2022-02-06 23:14:08 +01:00

67 lines
1.6 KiB
YAML

os: linux
dist: bionic
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache/files
jobs:
include:
# Test stage
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly
# Branch deployment stage
- stage: deploy-branch
if: type == "push" && tag IS blank
php: 7.2
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: 7.2
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"