language: python
sudo: false
python:
  - "3.6"
  - "3.7"

cache:
  pip: true
  directories:
    - node_modules
install:
  - pip install -U pip setuptools wheel
  - pip install tox-travis
  - nvm install 10
  - npm i
  - npm run build-assets --production
  - npm run build-emails
script:
  - npm run test
  - tox
env:
  global:
    - DATABASE_URL="postgres://postgres@localhost:5432/saleor"
    - SECRET_KEY="irrelevant"
  matrix:
  - DJANGO="2.2"
  - DJANGO="master"
matrix:
  include:
    - python: "3.7"
      sudo: required
      dist: xenial
      env: DJANGO="2.2"
    - python: "3.7"
      sudo: required
      dist: xenial
      env: DJANGO="master"
  fast_finish: true
  allow_failures:
    - python: "3.6"
      env: DJANGO="master"
    - python: "3.7"
      env: DJANGO="master"
      sudo: required
      dist: xenial
services:
  - postgresql
addons:
  postgresql: 9.4

language: python
sudo: false
python:
  - "3.6"

cache:
  pip: true
  directories:
    - node_modules
install:
  - pip install -U pip setuptools wheel
  - pip install tox-travis
  - nvm install 10
  - npm i
  - npm run build-assets --production
  - npm run build-emails
script:
  - npm run test
  - tox
env:
  global:
    - DATABASE_URL="postgres://postgres@localhost:5432/saleor"
    - SECRET_KEY="irrelevant"
  matrix:
  - DJANGO="2.2"
  - DJANGO="master"
matrix:
  include:
    - python: "3.7"
      sudo: required
      dist: xenial
      env: DJANGO="2.2"
    - python: "3.7"
      sudo: required
      dist: xenial
      env: DJANGO="master"
  fast_finish: true
  allow_failures:
    - python: "3.6"
      env: DJANGO="master"
    - python: "3.7"
      env: DJANGO="master"
      sudo: required
      dist: xenial
services:
  - postgresql
addons:
  postgresql: 9.4

Remove duplicated jobs for py3.7
Remove duplicated jobs for py3.7
