matrix:
  include:
    - language: python
      python: "3.4"
    - language: python
      python: "3.6"
    - language: generic
      os: osx
      before_install:
        - brew update
        - brew install python3
        - virtualenv env -p python3
        - source env/bin/activate
      install: sudo pip3 install -r requirements.txt
script: python test.py

matrix:
  include:
    - language: python
      python: "3.4"
    - language: python
      python: "3.6"
    - language: generic
      os: osx
      before_install:
        - brew update
        - brew install python3
        - virtualenv env -p python3
        - source env/bin/activate
      install: sudo -H pip3 install -r requirements.txt
script: python test.py

Edit macOS CI install command
Edit macOS CI install command