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: Warm Up Cache & Lint & Build Dist - name: Unit test - name: e2e Test - name: Deploy PR 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: Warm Up Cache & Lint & Build Dist name: Warm Up Cache & Lint & Build Dist script: ./scripts/travis/build/build.sh - 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 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