Files
alfresco-ng2-components/.travis.yml
Eugenio Romano 6059690e79 exclude upload folder test as far we don't find a solution in chrome 73 (#4473)
* exclude upload folder test as far we don't find a solution in chrome 73

* exclude folder drag and drop test chrome 73

* fix test search

* Update .travis.yml

* xit C279918 C279916

* fix process-service cloud application list
2019-03-23 20:32:03 +00:00

204 lines
9.4 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.
- '8.9.4'
install:
echo "no install"
branches:
only:
- master
- development
- /.*beta.*/
- /.*greenkeeper.*/
# TRAVIS_PULL_REQUEST == false means is running on dev branch and is not a PR
stages:
- name: Warm Up Cache
if: branch = master
- name: Warm Up Cache & Lint & Build Dist
if: branch != master
- name: Unit test
- name: e2e Test
- name: Create Docker PR
- name: Deploy Docker 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
script:
- ./scripts/npm-build-all.sh || exit 1
- stage: Warm Up Cache & Lint & Build Dist
script:
- ./scripts/update-version.sh -gnu -alpha || exit 1
- npm install
- ./scripts/lint.sh || exit 1
- rm -rf tmp && mkdir tmp
- git merge-base origin/$TRAVIS_BRANCH HEAD > ./tmp/devhead.txt
- (./scripts/smart-build.sh -b $TRAVIS_BRANCH -gnu || exit 1;);
- npm run build:dist || exit 1
- ./scripts/license-list-generator.sh
- stage: Unit test
name: core and extensions
script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "core$" || $TRAVIS_PULL_REQUEST == "false" ]];
then
ng test core --watch=false || exit 1;
fi;
script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "extensions$" || $TRAVIS_PULL_REQUEST == "false" ]];
then
ng test extensions --watch=false || exit 1;
fi;
- stage: Unit test
name: process-services and insights
script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
then
ng test process-services --watch=false || exit 1;
fi;
script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "insights$" || $TRAVIS_PULL_REQUEST == "false" ]];
then
ng test insights --watch=false || exit 1;
fi;
- stage: Unit test
name: content-services
script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
then
ng test content-services --watch=false || exit 1;
fi;
- stage: Unit test
name: process-services-cloud
script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $TRAVIS_PULL_REQUEST == "false" ]];
then
ng test process-services-cloud --watch=false || exit 1;
fi;
- stage: Unit test
name: demo-shell
script: if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/start.sh -t -ss -si || exit 1;);
else
(./scripts/start.sh -dev -t -ss -si || exit 1;);
fi;
- stage: Update children projects dependency #Update generator-ng2-alfresco-app
name: Update Generator
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n generator-ng2-alfresco-app
- stage: Update children projects dependency # Test Update alfresco-content-app
name: Update ACA
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-content-app
- stage: Update children projects dependency # Test Update adf-app-manager-ui
name: Update adf-app-manager-ui
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n adf-app-manager-ui
- stage: Update children projects dependency # Test Update alfresco-ng2-components
name: Update alfresco-ng2-components
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-ng2-components
- stage: Update children projects dependency # Test Update alfresco-modeler-app
name: Update alfresco modeler app
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-modeler-app
- stage: e2e Test # Test core
name: core
script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "core$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder core --skip-lint -save --use-dist || exit 1;);
fi;
- stage: e2e Test # Test process-services
name: process-services
script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test content-services
name: content-services
script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder content-services --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test search
name: search
script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder search --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test process-services-cloud
name: process-services-cloud
script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder process-services-cloud --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test insights
name: insights
script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder insights --skip-lint --use-dist || exit 1;);
fi;
- stage: Create Docker and Deploy Docker PR
script:
- if [ "$TRAVIS_PULL_REQUEST" != "false" ];
then
node ./scripts/move-dist-folder.js --base-href $TRAVIS_BUILD_NUMBER && (./scripts/pr-publish.sh -n $TRAVIS_BUILD_NUMBER -r $REPO_DOCKER -u $USERNAME_DOCKER -p $PASSWORD_DOCKER || exit 1);
fi;
- if [ "$TRAVIS_PULL_REQUEST" != "false" ];
then
(node --no-deprecation ./scripts/pr-deploy.js -n $TRAVIS_BUILD_NUMBER -u $RANCHER_TOKEN -p $RANCHER_SECRET -s $REPO_RANCHER --image "docker:$REPO_DOCKER/adf/demo-shell:$TRAVIS_BUILD_NUMBER" --env $ENVIRONMENT_NAME -r $ENVIRONMENT_URL || exit 1);
fi;
# Send coverage data to codecov
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov
cache:
directories:
- node_modules
- demo-shell/dist
- tmp