Skip to content

Commit 7095710

Browse files
committed
Parameterize jobs
1 parent 1367fa4 commit 7095710

File tree

1 file changed

+44
-82
lines changed

1 file changed

+44
-82
lines changed

.circleci/config.yml

+44-82
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ version: 2.1
33
orbs:
44
browser-tools: circleci/[email protected]
55

6+
executors:
7+
docker-container:
8+
parameters:
9+
version:
10+
description: "python version"
11+
default: "310"
12+
type: string
13+
docker:
14+
- image: cimg/python:<<parameters.version>>-browsers
15+
616
commands:
717
test_core:
818
steps:
@@ -43,13 +53,6 @@ commands:
4353
cd js
4454
npm ci
4555
npm run build
46-
- when:
47-
condition:
48-
not: << parameters.numpy_installed >>
49-
steps:
50-
- run: |
51-
source .venv/bin/activate
52-
uv pip uninstall numpy
5356
5457
- run:
5558
name: Test core
@@ -105,76 +108,28 @@ jobs:
105108
. venv/bin/activate
106109
black --check . --exclude venv
107110
108-
# Core
109-
python_38_core:
110-
docker:
111-
- image: cimg/python:3.8-browsers
112-
steps:
113-
- test_core
114-
115-
python_39_core:
116-
docker:
117-
- image: cimg/python:3.9-browsers
118-
steps:
119-
- test_core
120-
121-
python_310_core:
122-
docker:
123-
- image: cimg/python:3.10-browsers
124-
steps:
125-
- test_core
126-
127-
python_311_core:
128-
docker:
129-
- image: cimg/python:3.11-browsers
130-
steps:
131-
- test_core
132-
133-
python_312_core:
134-
docker:
135-
- image: cimg/python:3.12-browsers
111+
test_core:
112+
parameters:
113+
version:
114+
default: "310"
115+
type: string
116+
executor:
117+
name: docker-container
118+
version: <<parameters.version>>
136119
steps:
137120
- test_core
138121

139-
# Optional
140-
python_38_optional:
141-
docker:
142-
- image: cimg/python:3.8-browsers
143-
steps:
144-
- test_optional
145-
146-
python_39_optional:
147-
docker:
148-
- image: cimg/python:3.9-browsers
149-
steps:
150-
- test_optional
151-
152-
python_310_optional:
153-
docker:
154-
- image: cimg/python:3.10-browsers
155-
steps:
156-
- test_optional
157-
158-
python_311_optional:
159-
docker:
160-
- image: cimg/python:3.11-browsers
161-
steps:
162-
- test_optional
163-
164-
python_312_optional:
165-
docker:
166-
- image: cimg/python:3.12-browsers
122+
test_optional:
123+
parameters:
124+
version:
125+
default: "310"
126+
type: string
127+
executor:
128+
name: docker-container
129+
version: <<parameters.version>>
167130
steps:
168131
- test_optional
169132

170-
# No numpy
171-
python_312_no_numpy:
172-
docker:
173-
- image: cimg/python:3.12-browsers
174-
steps:
175-
- test_optional:
176-
numpy_installed: false
177-
178133
# Percy
179134
python_39_percy:
180135
docker:
@@ -435,16 +390,23 @@ workflows:
435390

436391
build:
437392
jobs:
438-
- python_38_core
439-
- python_39_core
440-
- python_310_core
441-
- python_311_core
442-
- python_312_core
443-
- python_38_optional
444-
- python_39_optional
445-
- python_310_optional
446-
- python_311_optional
447-
- python_312_optional
393+
- test_core:
394+
matrix:
395+
parameters:
396+
version:
397+
- "38"
398+
- "39"
399+
- "310"
400+
- "311"
401+
- "312"
402+
- test_optional:
403+
matrix:
404+
parameters:
405+
version:
406+
- "38"
407+
- "39"
408+
- "310"
409+
- "311"
410+
- "312"
448411
- python_39_percy
449-
- python_312_no_numpy
450412
- build-doc

0 commit comments

Comments
 (0)