https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Raw File
Tip revision: 983ae27b57a28550b6ee1a58e13cc9161bb89327 authored by Bryna Hazelton on 15 January 2020, 19:15 UTC
update release date
Tip revision: 983ae27
config.yml
version: 2.1
orbs:
  codecov: codecov/codecov@1.0.2 # to get this to work, had to opt-in to using third party orbs in Organization Security settings.
jobs:
  linter:
    parameters:
      python_version:
        type: string
      env_name:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: << parameters.env_name >>
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_linting.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install_conda.sh
      - run:
          name: linting for PEP8 and PEP257 (with numpy style) compliance
          command: |
            source activate ${ENV_NAME}
            flake8
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_linting.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"

  pyuvdata:
    parameters:
      python_version:
        type: string
      env_name:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: << parameters.env_name >>
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install_conda.sh
      - run:
          name: install
          command: |
            source activate ${ENV_NAME}
            python setup.py build_ext --force --inplace
      - run:
          name: run pyuvdata tests
          command: |
            source activate ${ENV_NAME}
            mkdir test-reports
            python -m pytest pyuvdata --cov=pyuvdata --cov-config=.coveragerc --cov-report xml:./coverage.xml --junitxml=test-reports/xunit.xml
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"
      - store_test_results:
          path: test-reports
      - store_artifacts:
          path: test-reports
      - codecov/upload:
          file: ./coverage.xml

  doctest:
    parameters:
      python_version:
        type: string
      env_name:
        type: string
    docker:
      - image: continuumio/miniconda:latest
    environment:
      PYTHON: << parameters.python_version >>
      ENV_NAME: << parameters.env_name >>
    steps:
      - checkout
      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
      - run:
          name: configure conda environment
          command: ./ci/install_conda.sh
      - run:
          name: install
          command: |
            source activate ${ENV_NAME}
            python setup.py build_ext --force --inplace
      - run:
          name: run tutorial tests
          command: |
            source activate ${ENV_NAME}
            python -m doctest docs/tutorial.rst
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
          paths:
            - "/opt/conda/envs/${ENV_NAME}/"

workflows:
  version: 2
  build_and_test:
    jobs:
      - linter:
          python_version: "3.6"
          env_name: "pyuvdata_linting"
      - pyuvdata:
          name: pyuvdata_2.7
          python_version: "2.7"
          env_name: "pyuvdata_tests"
      - pyuvdata:
          name: pyuvdata_3.6
          python_version: "3.6"
          env_name: "pyuvdata_tests"
      - pyuvdata:
          name: pyuvdata_3.7
          python_version: "3.7"
          env_name: "pyuvdata_tests"
      - pyuvdata:
          name: pyuvdata_3.8
          python_version: "3.8"
          env_name: "pyuvdata_tests"
      - pyuvdata:
          name: pyuvdata_min_deps
          python_version: "3.6"
          env_name: "pyuvdata_min_deps_tests"
      - doctest:
          python_version: "3.6"
          env_name: "pyuvdata_tests"
back to top