1
1
name : Test
2
2
3
3
on :
4
- push :
5
- branches : [ main ]
6
4
pull_request :
7
5
branches : [ main , "migrate-*"]
8
6
schedule :
@@ -18,42 +16,65 @@ jobs:
18
16
pytest :
19
17
strategy :
20
18
matrix :
21
- # One job per OS; latest python version testable on GitHub actions.
22
- # These should match the versions used in the "pytest" workflows of both
23
- # ixmp and message_ix.
24
- version :
25
- - { os: macos-latest, python: "3.11" }
26
- - { os: ubuntu-latest, python: "3.11" }
27
- - { os: windows-latest, python: "3.11" }
28
- # Versions of both ixmp and message_ix to use
19
+ os :
20
+ - macos-latest
21
+ - ubuntu-latest
22
+ - windows-latest
29
23
upstream :
30
- - { version: v3.4.0, extra-deps: '"pandas<2.0"' } # Minimum version given in setup.cfg
31
- - { version: v3.5.0, extra-deps: '"pandas<2.0"' }
32
- - { version: v3.6.0, extra-deps: '"pandas<2.0"' }
33
- - { version: v3.7.0, extra-deps: "" } # Latest released version
34
- - { version: main, extra-deps: "" } # Development version
24
+ # In each group:
25
+ # - Versions of ixmp and message_ix to test.
26
+ # - Latest supported Python version for those or other dependencies.
27
+ # - Extra dependencies, in particular fixed/maximum versions to resolve conficts.
28
+ # - dask[dataframe] >= 2024.3.0 requires dask-expr and in turn pandas >= 2.0.
29
+ # https://github.com/iiasa/message-ix-models/pull/156#issuecomment-2020152360
30
+ # - genno: upstream versions < 3.8.0 import genno.computations, removed in 1.25.0.
31
+ # https://github.com/iiasa/message-ix-models/pull/156
32
+ # - pytest: upstream versions < 3.9.0 use a hook argument removed in pytest 8.1.0.
33
+ # https://github.com/iiasa/message-ix-models/pull/155
34
+ #
35
+ # Minimum version given in pyproject.toml
36
+ - version : v3.4.0
37
+ python-version : " 3.11"
38
+ extra-deps : ' "dask < 2024.3.0" "genno < 1.25" "pandas < 2.0" "pytest == 8.0.0"' #
39
+ - version : v3.5.0
40
+ python-version : " 3.11"
41
+ extra-deps : ' "dask < 2024.3.0" "genno < 1.25" "pandas < 2.0" "pytest == 8.0.0"' #
42
+ - version : v3.6.0
43
+ python-version : " 3.11"
44
+ extra-deps : ' "dask < 2024.3.0" "genno < 1.25" "pandas < 2.0" "pytest == 8.0.0"' #
45
+ - version : v3.7.0
46
+ python-version : " 3.11"
47
+ extra-deps : ' dask[dataframe] "genno < 1.25" "pytest == 8.0.0"' #
48
+ # Latest released version
49
+ - version : v3.8.0
50
+ python-version : " 3.12"
51
+ extra-deps : ' dask[dataframe] "pytest == 8.0.0"' #
52
+ # Development version
53
+ - version : main
54
+ python-version : " 3.12"
55
+ extra-deps : ' dask[dataframe]' #
35
56
36
57
fail-fast : false
37
58
38
- runs-on : ${{ matrix.version. os }}
39
- name : ${{ matrix.version. os }}-py${{ matrix.version .python }}-upstream-${{ matrix.upstream.version }}
59
+ runs-on : ${{ matrix.os }}
60
+ name : ${{ matrix.os }}-py${{ matrix.upstream .python-version }}-upstream-${{ matrix.upstream.version }}
40
61
41
62
steps :
42
63
- name : Cache test data
43
- uses : actions/cache@v3
64
+ uses : actions/cache@v4
44
65
with :
45
66
path : message-local-data
46
- key : ${{ matrix.version. os }}
67
+ key : ${{ matrix.os }}
47
68
48
69
- name : Check out message-ix-models
49
- uses : actions/checkout@v3
70
+ uses : actions/checkout@v4
50
71
with :
51
72
lfs : true
52
73
fetch-depth : ${{ env.depth }}
53
74
54
- - uses : actions/setup-python@v4
75
+ - uses : actions/setup-python@v5
55
76
with :
56
- python-version : ${{ matrix.version .python }}
77
+ python-version : ${{ matrix.upstream .python-version }}
57
78
cache : pip
58
79
cache-dependency-path : " **/pyproject.toml"
59
80
62
83
version : 25.1.1
63
84
license : ${{ secrets.GAMS_LICENSE }}
64
85
65
- - uses : ts-graphviz/setup-graphviz@v1
86
+ - uses : ts-graphviz/setup-graphviz@v2
66
87
with :
67
88
macos-skip-brew-update : true
68
89
@@ -98,21 +119,23 @@ jobs:
98
119
shell : bash
99
120
100
121
- name : Upload test coverage to Codecov.io
101
- uses : codecov/codecov-action@v3
122
+ uses : codecov/codecov-action@v4
123
+ with :
124
+ token : ${{ secrets.CODECOV_TOKEN }} # required
102
125
103
126
pre-commit :
104
127
name : Code quality
105
128
106
129
runs-on : ubuntu-latest
107
130
108
131
steps :
109
- - uses : actions/checkout@v3
110
- - uses : actions/setup-python@v4
111
- with : { python-version: "3.11 " }
132
+ - uses : actions/checkout@v4
133
+ - uses : actions/setup-python@v5
134
+ with : { python-version: "3.12 " }
112
135
113
136
- name : Force recreation of pre-commit virtual environment for mypy
114
137
if : github.event_name == 'schedule' # Comment this line to run on a PR
115
138
run : gh cache list -L 999 | cut -f2 | grep pre-commit | xargs -I{} gh cache delete "{}" || true
116
139
env : { GH_TOKEN: "${{ github.token }}" }
117
140
118
- -
uses :
pre-commit/[email protected] .0
141
+ -
uses :
pre-commit/[email protected] .1
0 commit comments