language: generic
sudo: required
before_install:
  - sudo add-apt-repository ppa:duggan/bats --yes
  - sudo apt-get update -qq
  - sudo apt-get install -qq bats
before_script:
  - pip install --user codecov && codecov
script: bats --tap test
notifications:
  email:
    on_success: never

language: generic
sudo: required
before_install:
  - sudo add-apt-repository ppa:duggan/bats --yes
  - sudo apt-get update -qq
  - sudo apt-get install -qq bats
script: bats --tap test
after_success:
  - bash <(curl -s https://codecov.io/bash)
notifications:
  email:
    on_success: never

Use after_success instead of before_script hook
Use after_success instead of before_script hook
