@@ -27,10 +27,13 @@ jobs:
27
27
strategy :
28
28
matrix :
29
29
os : [ubuntu-latest]
30
- python-version : ['3.7', '3.8', '3.9', '3.10', '3.11']
30
+ python-version : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
31
31
include :
32
32
- os : macos-latest
33
- python-version : ' 3.11'
33
+ python-version : ' 3.12'
34
+ # Intel runner
35
+ - os : macos-13
36
+ python-version : ' 3.12'
34
37
35
38
steps :
36
39
- uses : actions/checkout@v4
@@ -68,34 +71,47 @@ jobs:
68
71
if : >-
69
72
github.event_name != 'schedule' &&
70
73
matrix.os == 'ubuntu-latest'
71
- uses : codecov/codecov-action@v3
74
+ uses : codecov/codecov-action@v4
72
75
with :
76
+ fail_ci_if_error : true
73
77
files : ./coverage.xml
74
78
flags : unittests-${{ matrix.python-version }}
79
+ token : ${{ secrets.CODECOV_TOKEN }}
75
80
76
81
- name : Test Contrib module with pytest
77
82
run : |
78
83
pytest tests/contrib --mpl --mpl-baseline-path tests/contrib/baseline
79
84
80
85
- name : Report contrib coverage with Codecov
81
- if : github.event_name != 'schedule' && matrix.python-version == '3.11 ' && matrix.os == 'ubuntu-latest'
82
- uses : codecov/codecov-action@v3
86
+ if : github.event_name != 'schedule' && matrix.python-version == '3.12 ' && matrix.os == 'ubuntu-latest'
87
+ uses : codecov/codecov-action@v4
83
88
with :
89
+ fail_ci_if_error : true
84
90
files : ./coverage.xml
85
91
flags : contrib
92
+ token : ${{ secrets.CODECOV_TOKEN }}
86
93
87
94
- name : Test docstring examples with doctest
88
- if : matrix.python-version == '3.11'
89
- run : pytest src/ README.rst
95
+ # TODO: Don't currently try to match amd64 and arm64 floating point for docs, but will in the future.
96
+ if : matrix.python-version == '3.12' && matrix.os != 'macos-latest'
97
+ run : coverage run --data-file=.coverage-doctest --module pytest src/ README.rst
98
+
99
+ - name : Coverage report for doctest only
100
+ if : matrix.python-version == '3.12' && matrix.os != 'macos-latest'
101
+ run : |
102
+ coverage report --data-file=.coverage-doctest
103
+ coverage xml --data-file=.coverage-doctest -o doctest-coverage.xml
90
104
91
105
- name : Report doctest coverage with Codecov
92
- if : github.event_name != 'schedule' && matrix.python-version == '3.11 ' && matrix.os == 'ubuntu-latest'
93
- uses : codecov/codecov-action@v3
106
+ if : github.event_name != 'schedule' && matrix.python-version == '3.12 ' && matrix.os == 'ubuntu-latest'
107
+ uses : codecov/codecov-action@v4
94
108
with :
95
- files : ./coverage.xml
109
+ fail_ci_if_error : true
110
+ files : doctest-coverage.xml
96
111
flags : doctest
112
+ token : ${{ secrets.CODECOV_TOKEN }}
97
113
98
114
- name : Run benchmarks
99
- if : github.event_name == 'schedule' && matrix.python-version == '3.11 '
115
+ if : github.event_name == 'schedule' && matrix.python-version == '3.12 '
100
116
run : |
101
117
pytest --benchmark-sort=mean tests/benchmarks/test_benchmark.py
0 commit comments