1
1
# Test PyGMT on Linux/macOS/Windows
2
2
#
3
- # This workflow runs regular PyGMT tests and uploads test coverage reports stored in
4
- # `.coverage.xml` to https://app.codecov.io/gh/GenericMappingTools/pygmt via the
5
- # [Codecov GitHub Action](https://github.com/codecov/codecov-action). More codecov
6
- # related configurations are stored in `.github/codecov.yml`. If any tests fail, it also
7
- # uploads the diff images as workflow artifacts.
3
+ # This workflow runs regular PyGMT tests and uploads test coverage reports stored
4
+ # in `.coverage.xml` to https://app.codecov.io/gh/GenericMappingTools/pygmt
5
+ # via the [Codecov GitHub Action](https://github.com/codecov/codecov-action).
6
+ # More codecov related configurations are stored in `.github/codecov.yml`.
7
+ # If any tests fail, it also uploads the diff images as workflow artifacts.
8
8
#
9
9
# It is run:
10
10
# 1. on every commit to the main branch
11
- # 2. on every commit to the pull request branches, unless the pull requests only contain
12
- # non-code changes.
11
+ # 2. on every commit to the pull request branches, unless the pull requests only
12
+ # contain non-code changes.
13
13
# 3. when a new release is published
14
14
#
15
15
# It is also scheduled to run daily on the main branch.
16
16
#
17
- # In draft pull request, only jobs on Linux are triggered to save on Continuous
18
- # Integration resources:
17
+ # In draft pull request, only two jobs on Linux are triggered to save on
18
+ # Continuous Integration resources:
19
19
#
20
- # - Minimum supported Python + core packages (minimum supported versions)
21
- # + optional packages (minimum supported versions if any)
22
- # - Latest Python + core packages (latest versions) + optional packages
23
- # - Last release before the latest Python + core packages
20
+ # - Minimum supported Python, NumPy, pandas, Xarray versions following [SPEC 0](https://scientific-python.org/specs/spec-0000/)
21
+ # - Latest Python, NumPy versions + optional packages (e.g. GeoPandas)
24
22
#
25
23
name : Tests
26
24
@@ -61,32 +59,35 @@ jobs:
61
59
# Is it a draft Pull Request (true or false)?
62
60
isDraft :
63
61
- ${{ github.event.pull_request.draft }}
64
- # Only run three jobs on Ubuntu for draft PRs
62
+ # Only run two jobs ( Ubuntu + Python 3.10/3.12) for draft PRs
65
63
exclude :
66
64
- os : macos-latest
67
65
isDraft : true
68
66
- os : windows-latest
69
67
isDraft : true
68
+ # Pair Python 3.10 with the minimum supported versions of NumPy, pandas, Xarray
69
+ # and Python 3.12 with the latest versions of NumPy, pandas, Xarray
70
+ # Only install optional packages on Python 3.12
70
71
include :
71
- # Python 3.10 + core packages (minimum supported versions) + optional packages (minimum supported versions if any)
72
72
- python-version : ' 3.10'
73
73
numpy-version : ' 1.24'
74
74
pandas-version : ' =2.0'
75
75
xarray-version : ' =2023.04'
76
- optional-packages : ' contextily geopandas<1 ipython pyarrow rioxarray sphinx-gallery'
77
- # Python 3.12 + core packages (latest versions) + optional packages
76
+ optional-packages : ' '
78
77
- python-version : ' 3.12'
79
78
numpy-version : ' 2.1'
80
79
pandas-version : ' '
81
80
xarray-version : ' '
82
- optional-packages : ' contextily geopandas>=1.0 ipython pyarrow rioxarray sphinx-gallery'
83
- # Python 3.11 + core packages (Linux only)
81
+ optional-packages : ' contextily geopandas ipython pyarrow rioxarray sphinx-gallery'
82
+ # The job below is for testing GeoPandas v0.x on Ubuntu.
83
+ # The python-version here can't be the versions in the matrix.python-version
84
+ # defined above. Otherwise, other jobs will be overridden by this one.
84
85
- os : ' ubuntu-latest'
85
- python-version : ' 3.11'
86
- numpy-version : ' '
86
+ python-version : ' 3.11' # Can't be 3.10 or 3.12.
87
+ numpy-version : ' 1.24 '
87
88
pandas-version : ' '
88
89
xarray-version : ' '
89
- optional-packages : ' '
90
+ optional-packages : ' geopandas<1 '
90
91
91
92
timeout-minutes : 30
92
93
defaults :
@@ -113,7 +114,7 @@ jobs:
113
114
114
115
# Install Micromamba with conda-forge dependencies
115
116
- name : Setup Micromamba
116
- uses : mamba-org/setup-micromamba@v2.0.1
117
+ uses : mamba-org/setup-micromamba@v2.0.0
117
118
with :
118
119
environment-name : pygmt
119
120
condarc : |
0 commit comments