Skip to content

Commit 251ae3c

Browse files
authored
Merge pull request #7471 from plotly/fix-ci-2025-Jul-16
Run image tests and test-exports on new CircleCI's `cimg/python` new system
2 parents 79559af + 15db6ff commit 251ae3c

16 files changed

+29
-14
lines changed

.circleci/config.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,12 @@ jobs:
217217
make-baselines-virtual-webgl:
218218
parallelism: 8
219219
docker:
220-
- image: circleci/python:3.8.9
220+
- image: cimg/python:3.12.11
221221
working_directory: ~/plotly.js
222222
steps:
223223
- attach_workspace:
224224
at: ~/
225+
- run: sudo apt-get update
225226
- run:
226227
name: Install kaleido, plotly.io and required fonts
227228
command: .circleci/env_image.sh
@@ -235,11 +236,12 @@ jobs:
235236

236237
make-baselines-mathjax3:
237238
docker:
238-
- image: circleci/python:3.8.9
239+
- image: cimg/python:3.12.11
239240
working_directory: ~/plotly.js
240241
steps:
241242
- attach_workspace:
242243
at: ~/
244+
- run: sudo apt-get update
243245
- run:
244246
name: Install kaleido, plotly.io and required fonts
245247
command: .circleci/env_image.sh
@@ -254,11 +256,12 @@ jobs:
254256
make-baselines:
255257
parallelism: 12
256258
docker:
257-
- image: circleci/python:3.8.9
259+
- image: cimg/python:3.12.11
258260
working_directory: ~/plotly.js
259261
steps:
260262
- attach_workspace:
261263
at: ~/
264+
- run: sudo apt-get update
262265
- run:
263266
name: Install kaleido, plotly.io and required fonts
264267
command: .circleci/env_image.sh
@@ -273,11 +276,12 @@ jobs:
273276
make-baselines-b64:
274277
parallelism: 12
275278
docker:
276-
- image: circleci/python:3.8.9
279+
- image: cimg/python:3.12.11
277280
working_directory: ~/plotly.js
278281
steps:
279282
- attach_workspace:
280283
at: ~/
284+
- run: sudo apt-get update
281285
- run:
282286
name: Install kaleido, plotly.io and required fonts
283287
command: .circleci/env_image.sh
@@ -347,11 +351,12 @@ jobs:
347351

348352
make-exports:
349353
docker:
350-
- image: circleci/python:3.8.9
354+
- image: cimg/python:3.12.11
351355
working_directory: ~/plotly.js
352356
steps:
353357
- attach_workspace:
354358
at: ~/
359+
- run: sudo apt-get update
355360
- run:
356361
name: Install kaleido, plotly.io and required fonts
357362
command: .circleci/env_image.sh
@@ -362,7 +367,7 @@ jobs:
362367
sudo apt-get install poppler-utils
363368
- run:
364369
name: Create svg, jpg, jpeg, webp, pdf and eps files
365-
command: python3 test/image/make_exports.py
370+
command: sudo python3 test/image/make_exports.py
366371
- persist_to_workspace:
367372
root: ~/
368373
paths:
@@ -488,7 +493,7 @@ jobs:
488493
- store_artifacts:
489494
path: stackgl_modules/index.js
490495
destination: stackgl_modules/index.js
491-
496+
492497
test-topojson-build:
493498
docker:
494499
- image: cimg/node:18.20.4

.circleci/env_image.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22
set -e
33
# install required fonts
44
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji
5+
6+
# install pip
7+
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
8+
sudo python3 get-pip.py
9+
10+
# install additional fonts
11+
sudo python3 -m pip install requests
512
sudo python3 .circleci/download_google_fonts.py
613
sudo cp -r .circleci/fonts/ /usr/share/
14+
sudo apt install fontconfig
715
sudo fc-cache -f
16+
817
# install kaleido & plotly
9-
sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off
18+
sudo python3 -m pip install kaleido==0.2.1 plotly==6.2.0 --progress-bar off
19+
1020
# install numpy i.e. to convert arrays to typed arrays
1121
sudo python3 -m pip install numpy==1.24.2

.circleci/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,24 @@ case $1 in
9797
find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \
9898
find $ROOT/test/image/mocks/map* -type f -printf "%f\n"; \
9999
} | sed 's/\.json$//1' | circleci tests split)
100-
python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
100+
sudo python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
101101
exit $EXIT_STATE
102102
;;
103103

104104
make-baselines-mathjax3)
105-
python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$?
105+
sudo python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$?
106106
exit $EXIT_STATE
107107
;;
108108

109109
make-baselines-b64)
110110
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
111-
python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
111+
sudo python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
112112
exit $EXIT_STATE
113113
;;
114114

115115
make-baselines)
116116
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
117-
python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
117+
sudo python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
118118
exit $EXIT_STATE
119119
;;
120120

test/image/baselines/14.png

0 Bytes
Loading
32 Bytes
Loading

test/image/baselines/japanese.png

-106 Bytes
Loading
Loading
Loading
Loading
8 Bytes
Loading

0 commit comments

Comments
 (0)