language: python
os: linux
dist: focal

cache:
  pip: true
  directories:
    - $HOME/.cache/pypoetry

python:
  - "3.6"
  - "3.7"
  - "3.8"
  - "3.9"
before_install:
  - pip install --upgrade pip
  - pip install poetry
install:
  - poetry install
script:
  - if [[ $TRAVIS_PYTHON_VERSION = 3.9 ]]; then make style; fi
  - poetry run pytest tests --cov=immutabledict
after_success:
  - bash <(curl -s https://codecov.io/bash)

jobs:
  include:
    - stage: deploy
      script: skip
      if: tag IS present
      python: "3.9"
      before_deploy:
        - poetry config pypi-token.pypi $PYPI_TOKEN
        - poetry build
      deploy:
        provider: script
        script: poetry publish
        on:
          tags: true

language: python
os: linux
dist: focal

cache:
  pip: true
  directories:
    - $HOME/.cache/pypoetry

python:
  - "3.6"
  - "3.7"
  - "3.8"
  - "3.9"
before_install:
  - pip install --upgrade pip
  - pip install poetry
install:
  - poetry install
script:
  - if [[ $TRAVIS_PYTHON_VERSION = 3.9 ]]; then make style; fi
  - poetry run pytest tests --cov=immutabledict
after_success:
  - if [[ $TRAVIS_PYTHON_VERSION = 3.9 ]]; then bash <(curl -s https://codecov.io/bash); fi

jobs:
  include:
    - stage: deploy
      script: skip
      if: tag IS present
      python: "3.9"
      before_deploy:
        - poetry config pypi-token.pypi $PYPI_TOKEN
        - poetry build
      deploy:
        provider: script
        script: poetry publish
        on:
          tags: true

Send codecov coverage only one per CI run
Send codecov coverage only one per CI run
