Files
alfresco-ng2-components/.travis.yml
T

122 lines
3.3 KiB
YAML

git:
depth: 3
quiet: true
language: node_js
dist: trusty
sudo: required
node_js:
# Use the explicit NodeJS LTS version 8.9.4 to avoid any automatic upgrade of the version.
- '10.16.0'
install:
echo "no install"
branches:
only:
- master
- development
- /.*old-env.*/
- /.*next-release.*/
- /.*beta.*/
- /.*greenkeeper.*/
# TRAVIS_PULL_REQUEST == false means is running on dev branch and is not a PR
stages:
- name: Lint & Build Dist
- name: Unit test
- name: e2e Test
- name: Deploy PR
if: type = pull_request
- name: Release on npm
if: branch = development AND type = push
addons:
chrome: stable
before_script:
- "sudo chown root /opt/google/chrome/chrome-sandbox"
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3 # give xvfb some time to start
jobs:
include:
- stage: Lint & Build Dist
name: Build Dist
script:
- ./scripts/travis/build/build.sh || exit 1;
- stage: Lint & Build Dist
name: Lint
script: ./scripts/lint.sh || exit 1;
- stage: Unit test
name: Unit test content
script: ./scripts/travis/unit-test/content.sh
- stage: Unit test
name: Unit test core extension demo
script: ./scripts/travis/unit-test/core-extension-demo.sh
- stage: Unit test
name: Unit test process process-cloud insights
script: ./scripts/travis/unit-test/process.sh
- stage: Deploy PR
name: Deploy PR
script:
./scripts/travis/deploy/deploy.sh
- stage: Update children projects dependency #Update children projects dependency
name: Update Related Project
if: tag =~ .*beta.*
script: ./scripts/travis/update/update-children.sh
- stage: e2e Test
name: core
script: ./scripts/travis/e2e/core-e2e.sh
- stage: e2e Test
name: content
script:
./scripts/travis/e2e/content-services-e2e.sh
- stage: e2e Test
name: search
script:
./scripts/travis/e2e/search-e2e.sh
- stage: e2e Test
name: process
script:
./scripts/travis/e2e/process-services-e2e.sh
- stage: e2e Test
name: process Cloud
script:
./scripts/travis/e2e/process-services-cloud-e2e.sh
- stage: Release on npm
script:
- ./lib/dist/cli/bin/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "Alfresco"
- export TRAVIS_TAG=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
- echo "Create tag:" $TRAVIS_TAG
- git tag $TRAVIS_TAG
deploy:
provider: releases
api_key: $GITHUB_TOKEN
name: $TRAVIS_TAG
body: "Add the release note"
skip_cleanup: true
on:
branch: master
# Send coverage data to codecov
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov
cache:
directories:
- node_modules
- demo-shell/dist
- tmp
- lib/dist