dist: bionic
language: python

stages:
  - linting
  - test
  - name: package
    if: branch = master

python:
  - "3.6"
  - "3.7"

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

install:
  - wget https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
  - python get-poetry.py --preview -y
  - source $HOME/.poetry/env
  - poetry install -v

script:
  - pytest --cov=fri -n 2

after_success:
  - coveralls

jobs:
  include:
    - stage: linting
      install:
        - pip install pre-commit
        - pre-commit install-hooks
      script:
        - pre-commit run --all-files
      after_success: skip
    - stage: package
      name: PyPi package deploy
      script:
        - poetry publish --build
      after_success: skip
      skip_existing: true
      on:
        tags: true
        branch: master

before_deploy: portray as_html
deploy:
    provider: pages
    skip_cleanup: true
    local_dir: site/
    github_token: $GH_TOKEN
    keep_history: true
    on:
      branch: master
dist: bionic
language: python

stages:
  - linting
  - test
  - name: package
    if: branch = master AND tag IS present

python:
  - "3.6"
  - "3.7"

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

install:
  - wget https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
  - python get-poetry.py --preview -y
  - source $HOME/.poetry/env
  - poetry install -v

script:
  - pytest --cov=fri -n 2

after_success:
  - coveralls

jobs:
  include:
    - stage: linting
      install:
        - pip install pre-commit
        - pre-commit install-hooks
      script:
        - pre-commit run --all-files
      after_success: skip
    - stage: package
      name: PyPi package deploy
      script:
        - poetry publish --build
      after_success: skip
      skip_existing: true
      on:
        tags: true
        branch: master

before_deploy: portray as_html
deploy:
    provider: pages
    skip_cleanup: true
    local_dir: site/
    github_token: $GH_TOKEN
    keep_history: true
    on:
      branch: master
Add tag condition to Pypi stage
Add tag condition to Pypi stage

Signed-off-by: Lukas Pfannschmidt <65adda4326914576405c9e3a62f4904d96573863@lpfann.me>
