dist: bionic
language: python

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

python:
  - "3.6"
  - "3.7"

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

install:
  - pip install --upgrade pip
  - pip install poetry>=1.0.0b1 # Using preview build to enable pypi api token usage
  - 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

deploy:
  - provider: script
    name: PyPi package deploy
    script: poetry publish --build
    after_success: skip
    skip_existing: true
    on:
      tags: true
      branch: master
  - provider: pages
    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: deploy
    if: branch = master

python:
  - "3.6"
  - "3.7"

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

install:
  - pip install --upgrade pip
  - pip install poetry>=1.0.0b1 # Using preview build to enable pypi api token usage
  - 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: deploy
      name: PyPi package deploy
      script:
        - poetry publish --build
      after_success: skip
      skip_existing: true
      on:
        tags: true
        branch: master
    - name: Documentation
      script: skip
      after_success: skip
      before_deploy: portray as_html
      deploy:
        provider: pages
        skip_cleanup: true
        local_dir: site/
        github_token: $GH_TOKEN
        keep_history: true
        on:
          branch: master
Revert "use old deploy scheme"
Revert "use old deploy scheme"

This reverts commit 072821ef

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