summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: 395c8faae3140dd3b083485b46f70b3ca897e9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: 2.1

orbs:
  python: cjw296/python-ci@2

jobs:
  check-package:
    parameters:
      image:
        type: string
      python:
        type: string
        default: "python"
    docker:
      - image: << parameters.image >>
    steps:
      - python/check-package:
          package: "mock"
          test:
          - run:
              name: "Import package"
              command: << parameters.python >> -c "import mock"


common: &common
  jobs:
    - python/pip-run-tests:
        name: python36
        image: circleci/python:3.6
    - python/pip-run-tests:
        name: python37
        image: circleci/python:3.7
    - python/pip-run-tests:
        name: python38
        image: circleci/python:3.8
    - python/pip-run-tests:
        name: pypy36
        image: pypy:3.6

    - python/coverage:
        name: coverage
        requires:
          - python36
          - python37
          - python38
          - pypy36

    - python/pip-docs:
        name: docs
        requires:
          - coverage

    - python/pip-setuptools-build-package:
        name: package
        requires:
          - docs
        filters:
          branches:
            only: master

    - check-package:
        name: check-package-python37
        image: circleci/python:3.7
        requires:
          - package

    - check-package:
        name: check-package-python38
        image: circleci/python:3.8
        requires:
          - package

    - check-package:
        name: check-package-pypy36
        image: pypy:3.6
        python: pypy
        requires:
          - package

    - python/release:
        name: release
        config: .carthorse.yml
        requires:
          - check-package-python37
          - check-package-python38
          - check-package-pypy36

workflows:
  push:
    <<: *common
  periodic:
    <<: *common
    triggers:
      - schedule:
          cron: "0 1 * * *"
          filters:
            branches:
              only: master