Skip to content
Permalink
Browse files

Travis job parallelization (#2730)

  • Loading branch information...
patjouk authored and cadecairos committed Mar 11, 2019
1 parent b05a734 commit dddd9d0824d9f19d1ee3452dfecbae7347a41047
Showing with 2,475 additions and 133 deletions.
  1. +44 −27 .travis.yml
  2. +2,416 −102 package-lock.json
  3. +2 −4 package.json
  4. +6 −0 travis-scripts/npm-install.sh
  5. +7 −0 travis-scripts/python-install.sh
@@ -1,31 +1,10 @@
language: python
python:
- '3.6'
- '3.6'

addons:
postgresql: "9.6"
install:
- pip install --upgrade pip
- pip install pipenv
- pipenv install --dev --deploy
- nvm install --lts=carbon
- nvm use --lts=carbon
- npm install -g npm@latest # Needed to use npm ci
- npm ci # use package-lock.json
- npm i typescript@3.0.3 # STOPGAP, SEE https://github.com/percy/percy-cypress/issues/35
- npm i cypress@3.1.3 # version also noted in package.json -> peerDependencies
- npm i @percy/cypress@0.2.3 # version also noted in package.json -> peerDependencies
- pipenv run python network-api/manage.py collectstatic --no-input --verbosity 0
before_script:
- psql -c 'create database network;' -U postgres
- ./release-steps.sh
script:
- npm test
- pipenv run flake8 tasks.py network-api/
- pipenv run coverage run --source './network-api/networkapi' network-api/manage.py test networkapi
- pipenv run python network-api/manage.py load_fake_data
- npm run percy
after_success:
- coveralls

env:
global:
- ALLOWED_HOSTS=localhost
@@ -45,12 +24,50 @@ env:
- USE_S3=False
- X_FRAME_OPTIONS=DENY
- XSS_PROTECTION=True
matrix:
secure: mC4GYW8PC98k8BDqNoQDBAWkM90sRbe8yHfEhelL5YkvZC3ORZR8cbqzkAieShWf3upOc+xFMD3m8bsLvJGisg/CHm+j4f5d0shz0Sv5YG7Ru95TW4Hj/0H9QTlHG4OZ12hZ6ZD9k7xQdPL9CkKVordIQMH883UYdao9Tl5Y9i01uPpdAH/1mF6xpNHbVC6LjUv2zstoXqFCyABXaK2U3FqdymVhT1e99GlgVGteYTzsVEdv9AbhOaXH1U+0NLFOBhFVm1ub7zIZBrWgdZKStOiOlXdb14/oLw0crii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j2gMoK/0fQ3AcnU4EYdUVoMJ/RgWN5ROowA+AwMy7GMTqOV+8=

cache:
pip: true
directories:
- "$HOME/.npm"
- "$HOME/.npm"

branches:
only:
- master

matrix:
include:
- name: "Python tests"
install: ./travis-scripts/python-install.sh
before_script:
- psql -c 'create database network;' -U postgres
script:
- pipenv run flake8 tasks.py network-api/
- pipenv run coverage run --source './network-api/networkapi' network-api/manage.py test networkapi
after_success:
- coveralls
- name: "npm tests"
before_install:
- nvm install --lts=carbon
- nvm use --lts=carbon
install: ./travis-scripts/npm-install.sh
script: npm test
- name: "Percy tests"
if: NOT TRAVIS_PULL_REQUEST_BRANCH =~ /^(dependabot\/)/
before_install:
- nvm install --lts=carbon
- nvm use --lts=carbon
install:
- ./travis-scripts/python-install.sh
- ./travis-scripts/npm-install.sh
before_script:
- psql -c 'create database network;' -U postgres
- npm run build
- pipenv run python network-api/manage.py collectstatic --no-input --verbosity 0
- pipenv run python network-api/manage.py migrate --no-input
- pipenv run python network-api/manage.py block_inventory
- pipenv run python network-api/manage.py sync_page_translation_fields
- pipenv run python network-api/manage.py update_translation_fields
- pipenv run python network-api/manage.py load_fake_data
script: npm run percy

0 comments on commit dddd9d0

Please sign in to comment.
You can’t perform that action at this time.