version: 2.1

jobs:
  test:
    parameters:
      os:
        type: executor
      py:
        type: string
      mpi:
        type: string
    executor: << parameters.os >>
    steps:
      - checkout
      - run: .circleci/test-package py=<< parameters.py >> mpi=<< parameters.mpi >>
      - run: .circleci/upload-coverage

executors:
  linux:
    docker:
      - image: condaforge/linux-anvil-comp7

workflows:
  test-all:
    jobs:
      - test:
          filters:
            branches:
              only:
                - master
                - maint
                - ci/all
                - ci/circle
          matrix:
            parameters:
              os:
                - linux
              py:
                - "3.5"
                - "3.6"
                - "3.7"
                - "3.8"
                - "3.9"
               #- "3.10"
              mpi:
                - "mpich"
                - "openmpi"
