Files
alfresco-content-app/.travis.yml
Maurizio Vitale 9b0c31073a ACA Run the test against the remote env (#1669)
* Run the test against the remote env

* Use remote user

* exclude e2e and raise issue

* Exlude more

* small change to trigger travis

* add api method to get totalItems of various endpoints

* lint fix

* remove tests from excluded to see what fails

* - fix some issues with the screenshot plugin
- add methods to get total items for some endpoints
- fix some waitForApi calls to consider initial total items number
- sortByModified descending in order to find the item needed by the test when having items on multiple pages

* Try to fix screenshots

* a few more fixes

* Upload screenshots

* a few more fixes

* Delete e2e-output-${retry} at the end

* delete unused variable

* some changes

* lint

* try one more fix

* Try to fix retry

* a few more fixes

* Try to fix retry

* some more fixes

* Fix "on Recent Files" suite

* Move "on Search Results" at the beginning of the class in order to avoid waitForApi:catch

* Empty commit

* Empty commit

* Empty commit

* Run e2e with lite-server

* Exclude protractor report folder

* Remove useless config

* change browser size

* no message

* one more try

* Empty commit

* try to maximize

* fix upload Recent files tests

* revert maximizing the browser

* don't "Run e2e with lite-server"

* fix mark-favorite tests

* few more fixes

* fix viewer and share tests

* test the lite server with retry

* Verify suites with lite server

* some final fixes

* Try to use httpserver

* Print the file and use http server

* Use http-server to fix protractor retry

* more fixes

* forgot a space :|

* remove extra job not needed anymore
rename test data into more specific

* play with the screenshots

* try new run

* trigger one more run

* a few more little fixes

* Fix comments

* Remove comment

* Fix lint error

Co-authored-by: Adina Parpalita <Adina.Parpalita@ness.com>
Co-authored-by: Cristina Jalba <cristina.jalba@ness.com>
Co-authored-by: iuliaib <iulia.burca@ness.com>
2020-09-18 12:01:55 +01:00

157 lines
5.9 KiB
YAML

dist: bionic
sudo: required
services:
- xvfb
addons:
chrome: stable
language: node_js
node_js:
- '12.18.1'
cache:
directories:
- node_modules
- .protractor-smartrunner
branches:
only:
- master
- develop
- /.*beta.*/
before_install:
- . ./scripts/ci/job_hooks/before_install.sh
install: echo "no install"
stages:
- name: Quality and Unit tests
- name: Update Rancher
if: (type = push AND tag IS blank) OR type = api
- name: Release Libraries
if: branch = master AND type = push
- name: Release Tag
if: branch = master AND type = push
- name: e2e
- name: Trigger DW
if: (branch = master OR branch = develop OR (tag =~ .*beta.*)) AND (type = push OR type = api)
env:
global:
- API_CONTENT_HOST=$API_CONTENT_HOST_REMOTE
- API_AOS_HOST=$API_CONTENT_HOST_REMOTE
- ADMIN_EMAIL=$ADMIN_EMAIL_REMOTE
- ADMIN_PASSWORD=$ADMIN_PASSWORD_REMOTE
jobs:
include:
- stage: Quality and Unit tests
name: 'Code quality checks'
script: npm ci && npm run lint
- stage: Quality and Unit tests
name: 'Build (without animation)'
before_script: npx @alfresco/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
script: npm ci && npm run build.e2e
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a ./dist/app -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2"
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aos'
script: npm ci && ng test adf-office-services-ext --watch=false
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-shared'
script: npm ci && ng test aca-shared --watch=false
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-about'
script: npm ci && ng test aca-about --watch=false
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-settings'
script: npm ci && ng test aca-settings --watch=false
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: ACA'
script:
- npm ci
- ng test app --code-coverage --watch=false
- bash <(curl -s https://codecov.io/bash) -X gcov
cache: false
- stage: e2e
name: 'Test Suite appNavigation & search'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=authentication,listViews,navigation,application,pagination,search"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- name: 'Test Suite actionsAvailable'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=actionsAvailable"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- name: 'Test Suite addRemoveContent'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=addRemoveContent"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- name: 'Test Suite manageContent'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=manageContent"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- name: 'Test Suite sharingContent & markFavorite'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=sharingContent"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- name: 'Test Suite viewContent & metadata & extensions'
before_script:
- ./scripts/ci/job_hooks/before_e2e.sh "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" "./dist/app" "-a"
script: ./scripts/ci/jobs/affected-project-with.sh -target e2e -options "--suite=viewer,infoDrawer,extensions"
after_script:
- ./scripts/ci/job_hooks/after_e2e.sh
- stage: Update Rancher
name: Update Rancher
script: ./scripts/travis/deploy/deploy.sh
- stage: Release Libraries
name: Release Libraries
script:
- npm run build.extensions || exit 1;
- ./scripts/travis/release/release-npm.sh || exit 1;
- stage: Release Tag
script: ./scripts/travis/release/git-tag.sh
- stage: Trigger DW
script: ./scripts/trigger-travis.sh --pro --branch $TRAVIS_BRANCH Alfresco alfresco-digital-workspace-app $TRAVIS_ACCESS_TOKEN
notifications:
slack:
on_pull_requests: false
rooms:
secure: 'qcTP/+rhVweMSZZAQMPz4sW7boS8XC0RX1SPYgg7hIfxBr9747WpRLkJ1sirkVaXI/6XfYAyl42CTfPmTuJxIC+co/NSnEDknwVsnKZd0O/ykTpo+mxIN4BTZX8dm+gELR5IEYQPs+Yki3ZnD9b+0mCK1yD8JallKCQeE2U9BhzZhP/Fn0ce35EulybNp3QQDaox0XC+7gadMdxlvK8mzP1scw76wRLtx25QLxxV+OwEw0bzyh8y3onfjHfnoDcUQWRTNdnjapzmgf1LNdC202A5kwp5sJggfSDr+ActRqaMvv4BbMsFpdan34B6zPQJfyZL1r8IB8O8BEKcAaOUVcTjnZAOom8kHS8F07/mo5xnNYmV8oNX2/egr1CiG4U0EAGF2XGqM+vetYnF88LTEzy84kVxmSwKGVfzlGOyTplMXJ1iCENndtfWm1AXhAFj5RSsSAZg6IStTM+mcpnC75moEwQtj8bTenwehHz1HQAjQX7xeTQo27SxDc7oqp1ReyXCllMjKxckjVGmp2j6yxn1Jl55kivBj57vluLtEtziOGluVELP5E2fV0VAuErNhnjLm4LJARVN76PQaTOXYwATVVJJDhb/77TesvxQsr3VfiROEKm7QB7IDFjghjLLisSX67JQ5+7K/qMlqf9+9hNw4n0v1eMylVjt+gyxspc='
on_failure: always
on_success: change
template:
- 'Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`.'
- 'Author: %{author} Execution time: *%{duration}*'
- 'Message: %{message}'