version: 2

references:
  ci-steps: &ci-steps
    steps:
      - checkout
      - run:
          name: Initialize Virtual Environment
          command: |
            python -m virtualenv ../venv || python -m venv ../venv
      - run:
          name: Install scikit-ci
          command: |
            . ../venv/bin/activate
            pip install -U scikit-ci
            ci install
      - run:
          name: Run tests
          command: |
            . ../venv/bin/activate
            ci test
      - run:
          name: Deployement
          command: |
            . ../venv/bin/activate
            if [[ "${CIRCLE_BRANCH}" == "master" && "${PRERELEASE_UPLOAD}" == "1" ]]; then
              ci after_test
            fi
      - store_artifacts:
          path: dist/*

jobs:
  python27:
    docker:
      - image: circleci/python:2.7.14-jessie
    environment:
      # Used for testing
      - EXPECTED_PYTHON_VERSION: 2.7.14
      - EXPECTED_PYTHON_ARCH: 64
    <<: *ci-steps
  python37:
    docker:
      - image: circleci/python:3.7.2-stretch-browsers
    environment:
      # Used for testing
      - EXPECTED_PYTHON_VERSION: 3.7.2
      - EXPECTED_PYTHON_ARCH: 64
      # Attempt to upload pre-release only once
      - PRERELEASE_UPLOAD: 1
    <<: *ci-steps

workflows:
  version: 2
  test-package-publish:
    jobs:
      - python27
      - python37

version: 2

references:
  ci-steps: &ci-steps
    steps:
      - checkout
      - run:
          name: Initialize Virtual Environment
          command: |
            python -m virtualenv ../venv || python -m venv ../venv
      - run:
          name: Install scikit-ci
          command: |
            . ../venv/bin/activate
            pip install -U scikit-ci
            ci install
      - run:
          name: Run tests
          command: |
            . ../venv/bin/activate
            ci test
      - run:
          name: Deployement
          command: |
            . ../venv/bin/activate
            if [[ "${CIRCLE_BRANCH}" == "master" && "${PRERELEASE_UPLOAD}" == "1" ]]; then
              ci after_test
            fi
      - store_artifacts:
          path: dist/*

jobs:
  python27:
    docker:
      - image: circleci/python:2.7.17-stretch-browsers
    environment:
      # Used for testing
      - EXPECTED_PYTHON_VERSION: 2.7.17
      - EXPECTED_PYTHON_ARCH: 64
    <<: *ci-steps
  python37:
    docker:
      - image: circleci/python:3.7.2-stretch-browsers
    environment:
      # Used for testing
      - EXPECTED_PYTHON_VERSION: 3.7.2
      - EXPECTED_PYTHON_ARCH: 64
      # Attempt to upload pre-release only once
      - PRERELEASE_UPLOAD: 1
    <<: *ci-steps

workflows:
  version: 2
  test-package-publish:
    jobs:
      - python27
      - python37

Fix python 2.7 using "stretch" docker image
circle: Fix python 2.7 using "stretch" docker image

This commit addresses the following error:

  Err http://security.debian.org/ jessie/updates/main rsync amd64 3.1.1-3+deb8u1
    404  Not Found

  E: Failed to fetch http://security.debian.org/pool/updates/main/r/rsync/rsync_3.1.1-3+deb8u1_amd64.deb  404  Not Found
