proustibat/fbrgsmn.mobile.app

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
dist: trusty

env:
  global:
    - GITHUB_REPO: proustibat/fbrgsm.mobile.app
    # token at https://github.com/settings/tokens/new, secure with travis encrypt -r username/repository GH_TOKEN=[the token you created before]
    - secure: "atFmfjSNIePl2h2Qd2MK7SJHuzkCV9H7ND9WYILQovviq4zJBVtfNwGy7fLg2E91AnmhzuIJilECLSFuiazRHxcBk6xJyqfrcDBuWdSBhWLnpV3CIwvgQfNvNU55lrwReYjC3ZTpCnPBFFxOECS46MLkbH7GBPIlEDTuj+w+itd/iPy4qljfmNG3+ex5sWTGys2J/ssqQO9hXrwXoCsSp7fNu6BpE95eSqfWH0kwLrSKiBonMLXXp8NUQsobGijCj7cGoImdZeWeqCpMwqUpIfeKGa1y5Urh8fAbaV2xgDV+24+EUBKLjaKJU7DUAgb4UlwswyvLLObxnUubtzOB7WOEi7djrMAaeLXSA+q0Pnk12xWZY0MzmSrxjYXR7kGjb31s//zwwJcnM5NdMM1MrHEm0KX2dtBRjLpOF/L7voNqrqOvHqFv18dmaungzFYT49k2HXZHIgcwpvkW5woMfgw6lKR/jrSOi+HdLJ90g8Ju4vfw9vvU1/GIer59SR+hQVmCWsf2oU5SLuPnDfssD2qU+11oYKMfCnZTrwlzJ2N2QNskKF17/QLmR9QVyY3lmttMsyM8ilf4NJ3VmUhDgpmsss2ffTl4RrTDzkAhBpf/6AvBo4hwdqIGcaNqASXFI/rCSIaOzVfnKkLQTl4XAsXA/2ckCkhEHBYzNvPay34="
#    - CC_TEST_REPORTER_ID: 5e81078668dc11edc4d6dbab7b21579c59d4238bbd3216c2f5279acdfbe5d1c8

language: node_js
node_js: '8'
cache:
  directories:
    - node_modules


# create a user token here: https://sonarcloud.io/account/security
# run `travis encrypt your-token-here`
# paste secure token below
addons:
  sonarcloud:
    organization: proustibat-github
    token:
      secure: "lW+tEV58WNGeMaXhF6hkBglx2Jmd38+Sh7zm5W7T0VKe1U6vWsHF1qKd9kUrq2r8fcpx8kQDTkbd3qK3lrl63lcqBqco+SaEfiMUT3OliRFVRlSbCljSfAMpLrnsNShZZvxnxFDKmyaxPHKjwXAJVkjDBXUsZomQTd39ZGaZoiREpupR3ncNq3Ub0z36w/K4otqZVoLotlpzqDFRlVSlWhGPG5xC4YrJvKosWf/6x237mrO+0HJadegVxh9/3EjCr9rZF6PxhsCEiYn9ofHrpLPcgd5XFCP3fw1f8UtmxlnQA0L1g+9cvHvQggFxmUQ5bmNrZAySNXRJY5biZ8d50ZhtCBtsnO8XFTQ+/AWOrcpQEbTiGiowBG9d6EJOXLq3XGce4NIs0qwFbn4WhwCEvLuJeuw2StEXr8BLnjsoYkJ9pzxRQ6Lw2E1cZ9CQ0yOVXPeFE/DSqZhzKIQSLPvCrlL1eYaGqGcrEQu+hUi0OeAGEWbpfN+NihMA60MLfISnPH3BzDPpEvQEbnbNQzd1ba1XKM00m3uUnHmrjKoDqFO9pBr2putUN/C8hlul25grCcHvtWVKagbsWnClPo2vp0GwzsflM59gHXTChtlQEbhMKihrre7zLuOwSZHcj/50kN1j8Tt3OaVkuMycEYTjtT3u5r4HNcKGcV4M1c3VUQ8="

before_install:
  - npm install -g ionic@3.19.0 cordova@8.0.0

install:
  - npm install
  - ionic cordova platform add android ios


before_script:
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
#   Using xvfb to Run Tests That Require a GUI
#  - sleep 3 # give xvfb some time to start
#  - "sudo chown root /opt/google/chrome/chrome-sandbox"
#  - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
#  - export DISPLAY=:99.0
#  - sh -e /etc/init.d/xvfb start
#  - ./cc-test-reporter before-build

script:
  - npm run all-custom-lint
  - ionic cordova build android ios
  - npm run test-coverage


# Here we want to check out where we are.
# We only want to update Github Pages if we're building
# the master branch of the original repository, so we
# have to check $TRAVIS_PULL_REQUEST and $TRAVIS_BRANCH.
# If we are here, we run bash deploy.sh
after_success:
  - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run typedoc; fi
  - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then bash sonar.sh; fi
  - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then bash deploy.sh; fi


#after_script:
#  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT