https://github.com/GPflow/GPflow
Raw File
Tip revision: de302a10c2c7d91c6f94f72e73038220b7de75a4 authored by Artem Artemev on 17 June 2019, 16:31:51 UTC
Cleaning up
Tip revision: de302a1
config.yml
runtest: &runtest
  steps:
    - checkout
    - run:
        name: Install GPflow
        command: |
          python setup.py install
    - run:
        name: Run tests
        command: |
          pytest -v -W ignore::UserWarning --durations=10 -m "${PYTEST_FILTER}" --cov=./gpflow ./tests
    - run:
        name: Upload coverage report
        command: |
          bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}"

version: 2.1

jobs:
  unit-test:
    <<: *runtest
    docker:
      - image: awav/tensorflow:1.12.1
        environment:
          PYTEST_FILTER: not notebooks

  notebook-test:
    <<: *runtest
    docker:
      - image: awav/tensorflow:1.12.1
        environment:
          PYTEST_FILTER: notebooks

  deploy:
    docker:
      - image: awav/tensorflow:1.12.1
    steps:
      - checkout
      - run:
          name: Verify git tag vs. VERSION
          command: |
            VERSION="v$(cat VERSION | tr -d '\t\r\n ')"
            [ "$VERSION" != "$CIRCLE_TAG" ] && { echo "The package version ($VERSION) and the latest tag version ($CIRCLE_TAG) are different"; exit 1; }
      - run:
          name: Install twine
          command: |
            pip install twine
      - run:
          name: Init .pypirc
          command: |
            echo -e "[pypi]" >> ~/.pypirc
            echo -e "username = artemav" >> ~/.pypirc
            echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
      - run:
          name: Create pip package
          command: |
            make package
      - run:
          name: Upload to PyPI
          command: |
            twine upload dist/*

workflows:
  version: 2.1
  build_and_deploy:
    jobs:
      - deploy:
          filters:
            tags:
              only: /^v.*/
            branches:
              ignore: /.*/
  build_and_test:
    jobs:
      - unit-test
      - notebook-test
back to top