1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 2.1
2
+
3
+ orbs :
4
+ python : circleci/python@2.1.1
5
+
6
+ jobs :
7
+ ruff :
8
+ resource_class : small
9
+ parameters :
10
+ python-version :
11
+ type : string
12
+ docker :
13
+ - image : cimg/python:<< parameters.python-version >>
14
+ steps :
15
+ - checkout
16
+ - run :
17
+ name : Install Ruff
18
+ command : pip install ruff
19
+ - run :
20
+ name : Run Ruff
21
+ command : ruff check .
22
+
23
+ build-and-test :
24
+ resource_class : medium
25
+ parallelism : 2
26
+ parameters :
27
+ python-version :
28
+ type : string
29
+ docker :
30
+ - image : cimg/python:<< parameters.python-version >>
31
+ steps :
32
+ - checkout
33
+ - run :
34
+ name : Set Up Virtual Environment
35
+ command : |
36
+ curl https://sh.rustup.rs -sSf | sh -s -- -y
37
+ . "$HOME/.cargo/env"
38
+ python -m venv .venv
39
+ . .venv/bin/activate
40
+ python -m pip install --upgrade pip
41
+ python -m pip install '.[dev]'
42
+ - run :
43
+ name : Run Tests
44
+ command : |
45
+ . .venv/bin/activate
46
+ pytest tests/
47
+ - store_test_results :
48
+ path : test-results
49
+ - store_artifacts :
50
+ path : test-results
51
+
52
+ workflows :
53
+ test-and-lint :
54
+ jobs :
55
+ - ruff :
56
+ python-version : " 3.9.13"
57
+ - build-and-test :
58
+ matrix :
59
+ parameters :
60
+ python-version : ["3.9", "3.10", "3.11", "3.12"]
0 commit comments