8
8
9
9
jobs :
10
10
build :
11
-
11
+ env :
12
+ DEFAULT_PYTHON : 3.12
12
13
runs-on : ubuntu-latest
13
14
strategy :
14
15
matrix :
15
- python-version : ["3.8 ", "3.9 ", "3.10 ", "3.11 ", "3.12 "]
16
+ python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 ", "3.13 "]
16
17
architecture : ["x64"]
17
18
steps :
18
19
- uses : actions/checkout@v2
21
22
with :
22
23
python-version : ${{ matrix.python-version }}
23
24
architecture : ${{ matrix.architecture }}
24
- - name : Cache pip 3.8
25
- if : matrix.python-version == 3.8
26
- uses : actions/cache@v4
27
- with :
28
- # This path is specific to Ubuntu
29
- path : ~/.cache/pip
30
- restore-keys : |
31
- ${{ runner.os }}-
32
25
- name : Cache pip
33
- if : matrix.python-version != 3.8
34
26
env :
35
27
PYO3_USE_ABI3_FORWARD_COMPATIBILITY : " 1"
36
28
uses : actions/cache@v4
@@ -43,23 +35,23 @@ jobs:
43
35
# workaround for 3.12, SEE: https://github.com/pypa/setuptools/issues/3661#issuecomment-1813845177
44
36
pip install --upgrade setuptools
45
37
- name : Lint with flake8
46
- if : matrix.python-version == 3.12
38
+ if : matrix.python-version == ${{ env.DEFAULT_PYTHON }}
47
39
run : |
48
40
# stop the build if there are Python syntax errors or undefined names
49
- tox -e flake8 -- deepdiff --count --select=E9,F63,F7,F82 --show-source --statistics
41
+ nox -e flake8 -- deepdiff --count --select=E9,F63,F7,F82 --show-source --statistics
50
42
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
51
- tox -e flake8 -- deepdiff --count --exit-zero --max-complexity=26 --max-line-lengt =250 --statistics
43
+ nox -e flake8 -- deepdiff --count --exit-zero --max-complexity=26 --max-line-length =250 --statistics
52
44
- name : Test with pytest and get the coverage
53
- if : matrix.python-version == 3.12
45
+ if : matrix.python-version == ${{ env.DEFAULT_PYTHON }}
54
46
run : |
55
- tox -s -- --benchmark-disable --cov-report=xml --cov=deepdiff tests/ --runslow
47
+ nox -e pytest -s -- --benchmark-disable --cov-report=xml --cov=deepdiff tests/ --runslow
56
48
- name : Test with pytest and no coverage report
57
- if : matrix.python-version != 3.12
49
+ if : matrix.python-version != ${{ env.DEFAULT_PYTHON }}
58
50
run : |
59
- tox -s -- --benchmark-disable tests/
51
+ nox -e pytest -s -- --benchmark-disable tests/
60
52
- name : Upload coverage to Codecov
61
53
uses : codecov/codecov-action@v4
62
- if : matrix.python-version == 3.12
54
+ if : matrix.python-version == ${{ env.DEFAULT_PYTHON }}
63
55
env :
64
56
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
65
57
with :
0 commit comments