Skip to content

Commit 07e4816

Browse files
committed
test both Python 3.9 and 3.13 in CircleCI
These are the oldest and newest versions (to be) supported.
1 parent 39f619c commit 07e4816

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.circleci/config.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ orbs:
1515
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
1616
jobs:
1717
build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do!
18+
parameters:
19+
python-version:
20+
type: string
1821
# These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/
1922
# You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub
2023
# A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python
2124
# The executor is the environment in which the steps below will be executed - below will use a python 3.10.2 container
2225
# Change the version below to your required version of python
2326
docker:
24-
- image: cimg/python:3.9
27+
- image: cimg/python:<< parameters.python-version >>
2528
# Checkout the code as the first step. This is a dedicated CircleCI step.
2629
# The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default.
2730
# Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt.
@@ -31,15 +34,12 @@ jobs:
3134
- checkout
3235
- python/install-packages:
3336
pkg-manager: pip
34-
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
35-
# pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements.
3637
- run:
3738
name: Install Udapi
3839
command: pip install ".[test]"
3940
- run: mkdir -p test-results
4041
- run:
4142
name: Run pytest tests
42-
# This assumes pytest is installed via the install-package step above
4343
command: pytest --junitxml=test-results/junit.xml -o junit_family=legacy
4444
- store_test_results:
4545
path: test-results
@@ -54,7 +54,9 @@ jobs:
5454
# Invoke jobs via workflows
5555
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
5656
workflows:
57-
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
58-
# Inside the workflow, you define the jobs you want to run.
57+
test-matrix:
5958
jobs:
60-
- build-and-test
59+
- build-and-test:
60+
matrix:
61+
parameters:
62+
python-version: ["3.9", "3.13"]

0 commit comments

Comments
 (0)