Skip to content
Snippets Groups Projects
  • Zaida Zhou's avatar
    19d4eba8
    [Refactor] Update Github Action CI and CircleCI (#512) · 19d4eba8
    Zaida Zhou authored
    * [CI] Update Github Action CI and CircleCI
    
    * clear outdated commands in CI
    
    * clear outdated commands in CI
    
    * add '-r' when installing packages from txt
    
    * update
    
    * update circleci
    
    * fix mismatch conflicts
    
    * update
    
    * install system dependencies
    
    * update
    
    * set env
    
    * fix ut
    
    * update cuda version on Windows
    
    * update push action
    [Refactor] Update Github Action CI and CircleCI (#512)
    Zaida Zhou authored
    * [CI] Update Github Action CI and CircleCI
    
    * clear outdated commands in CI
    
    * clear outdated commands in CI
    
    * add '-r' when installing packages from txt
    
    * update
    
    * update circleci
    
    * fix mismatch conflicts
    
    * update
    
    * install system dependencies
    
    * update
    
    * set env
    
    * fix ut
    
    * update cuda version on Windows
    
    * update push action
test.yml 5.88 KiB
version: 2.1

# the default pipeline parameters, which will be updated according to
# the results of the path-filtering orb
parameters:
  lint_only:
    type: boolean
    default: true

jobs:
  lint:
    docker:
      - image: cimg/python:3.7.4
    steps:
      - checkout
      - run:
          name: Install pre-commit hook
          command: |
            pip install pre-commit
            pre-commit install
      - run:
          name: Linting
          command: pre-commit run --all-files
      - run:
          name: Check docstring coverage
          command: |
            pip install interrogate
            interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmengine

  build_without_torch:
    parameters:
      # The python version must match available image tags in
      # https://circleci.com/developer/images/image/cimg/python
      python:
        type: string
        default: "3.7.4"
    docker:
      - image: cimg/python:<< parameters.python >>
    resource_class: large
    steps:
      - checkout
      - run:
          name: Upgrade pip
          command: |
            pip install pip --upgrade
            pip --version
      - run:
          name: Build MMEngine from source
          command: pip install -e . -v
      - run:
          name: Install unit tests dependencies
          command: pip install -r requirements/tests.txt
      - run:
          name: Run unit tests
          command: pytest tests/test_config tests/test_registry tests/test_fileio tests/test_logging tests/test_utils --ignore=tests/test_utils/test_dl_utils

  build_cpu:
    parameters:
      # The python version must match available image tags in
      # https://circleci.com/developer/images/image/cimg/python
      python:
        type: string
      torch:
        type: string
      torchvision:
        type: string
    docker:
      - image: cimg/python:<< parameters.python >>
    resource_class: large
    steps: