summaryrefslogtreecommitdiffstats
path: root/.circleci/config.yml
blob: d7aa9d7eeb60530f0b4cbab66756f2376492c575 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: 2.1

orbs:
  node: circleci/node@5.0.2

commands:
  run-tox:
    description: "Run tox"
    parameters:
      version:
        type: string
      sphinx-version:
        type: string
        default: "latest"
    steps:
      - checkout
      # We cannot upgrade to Tox4 because running generative environments doesn't work.
      # I guess it has changed its syntax or similar.
      #   $ tox run -e "py310-sphinx{50,51}"
      #   ROOT: HandledError| provided environments not found in configuration file: ['51}']
      - run: pip install --user 'tox~=3.27'
      - run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
  run-build:
    description: "Ensure built assets are up to date"
    steps:
      - checkout
      - node/install:
          node-version: '14.20'
      - run: npm ci
      - run: npm run build
      - run:
          name: Ensure built assets are up to date
          command: |
            if [[ `git status sphinx_rtd_theme/ --porcelain` ]]
            then
              echo "ERROR: assets are out of date. Make sure to run 'npm run build' on your branch."
              git status sphinx_rtd_theme/ --porcelain
              exit 1
            fi

jobs:
  build:
    docker:
      - image: 'cimg/python:3.9-node'
    steps:
      - run-build: {}
  py36:
    docker:
      - image: 'cimg/python:3.6'
    steps:
      - run-tox:
          version: py36
          sphinx-version: "50,51,52,53"
  py37:
    docker:
      - image: 'cimg/python:3.7'
    steps:
      - run-tox:
          version: py37
          sphinx-version: "50,51,52,53"
  py38:
    docker:
      - image: 'cimg/python:3.8'
    steps:
      - run-tox:
          version: py38
          sphinx-version: "50,51,52,53,60,61,62,70,71,latest"
  py39:
    docker:
      - image: 'cimg/python:3.9'
    steps:
      - run-tox:
          version: py39
          sphinx-version: "50,51,52,53,60,61,62,70,71,72,latest"
  py310:
    docker:
      - image: 'cimg/python:3.10'
    steps:
      - run-tox:
          version: py310
          sphinx-version: "50,51,52,53,60,61,62,70,71,72,latest"
  py311:
    docker:
      - image: 'cimg/python:3.11'
    steps:
      - run-tox:
          version: py311
          sphinx-version: "53,60,61,62,70,71,72,latest,dev"

workflows:
  version: 2
  tests:
    jobs:
      - build
      - py311:
          requires:
            - build
      - py310:
          requires:
            - build
      - py39:
          requires:
            - build
      - py38:
          requires:
            - build
      - py37:
          requires:
            - build
      - py36:
          requires:
            - build