Skip to content

Commit 0cdbc9f

Browse files
committed
Update Python versions for build and testing.
* All builds are Python 3.11 * macOS and Windows testing updated to Python 3.11 * Linux testing updated to 3.9, 3.10, and 3.12 * File tests updated to 3.9-3.12 * SSH debugging option added to all workflow dispatches
1 parent 2a5162e commit 0cdbc9f

File tree

5 files changed

+83
-12
lines changed

5 files changed

+83
-12
lines changed

.github/workflows/build-subrepos.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ on:
1414
type: string
1515

1616
workflow_dispatch:
17+
inputs:
18+
ssh:
19+
description: 'Enable ssh debugging'
20+
required: false
21+
default: false
22+
type: boolean
1723

1824
concurrency:
1925
group: build-subrepos-${{ inputs.branch || github.ref_name }}
@@ -30,15 +36,14 @@ jobs:
3036
matrix:
3137
os: [ubuntu-latest]
3238
pkg: [python-lsp-server, qtconsole, spyder-kernels]
39+
python-version: ['3.11']
3340
include:
34-
- python-version: '3.11'
3541
- cache-arch: noarch
3642
- os: ubuntu-latest
3743
pkg: spyder-kernels
3844
cache-arch: unix
3945
- os: windows-latest
4046
pkg: spyder-kernels
41-
python-version: '3.11'
4247
cache-arch: win-64
4348
defaults:
4449
run:
@@ -48,6 +53,13 @@ jobs:
4853
pkg: ${{ matrix.pkg }}
4954

5055
steps:
56+
- name: Setup Remote SSH Connection
57+
if: env.ENABLE_SSH == 'true'
58+
uses: mxschmitt/action-tmate@v3
59+
timeout: 60
60+
with:
61+
detached: true
62+
5163
- name: Checkout Code
5264
uses: actions/checkout@v4
5365
with:

.github/workflows/test-files.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ on:
4242
workflow_call:
4343

4444
workflow_dispatch:
45+
inputs:
46+
ssh:
47+
# github_cli: gh workflow run test-files.yml --ref <branch> -f ssh=true
48+
description: 'Enable ssh debugging'
49+
required: false
50+
default: false
51+
type: boolean
4552

4653
concurrency:
4754
group: test-files-${{ github.ref }}
@@ -61,25 +68,37 @@ jobs:
6168
strategy:
6269
fail-fast: false
6370
matrix:
64-
PYTHON_VERSION: ['3.9', '3.10']
71+
PYTHON_VERSION: ['3.9', '3.10', '3.11', '3.12']
6572
timeout-minutes: 30
73+
6674
steps:
75+
- name: Setup Remote SSH Connection
76+
if: env.ENABLE_SSH == 'true'
77+
uses: mxschmitt/action-tmate@v3
78+
timeout: 60
79+
with:
80+
detached: true
81+
6782
- name: Checkout Pull Requests
6883
if: github.event_name == 'pull_request'
6984
uses: actions/checkout@v4
7085
with:
7186
ref: ${{ github.event.pull_request.head.sha }}
87+
7288
- name: Checkout Push
7389
if: github.event_name != 'pull_request'
7490
uses: actions/checkout@v4
91+
7592
- name: Fetch branches
7693
if: github.event_name == 'pull_request'
7794
run: git fetch --prune --unshallow
95+
7896
- name: Install dependencies
7997
shell: bash
8098
run: |
8199
sudo apt-get update --fix-missing
82100
sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing
101+
83102
- name: Cache conda
84103
uses: actions/cache@v4
85104
env:
@@ -88,11 +107,13 @@ jobs:
88107
with:
89108
path: ~/conda_pkgs_dir
90109
key: ${{ runner.os }}-cacheconda-installconda-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }}
110+
91111
- name: Cache pip
92112
uses: actions/cache@v4
93113
with:
94114
path: ~/.cache/pip
95115
key: ${{ runner.os }}-cachepip-installconda-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }}
116+
96117
- name: Create conda test environment
97118
uses: mamba-org/setup-micromamba@v1
98119
with:
@@ -101,18 +122,17 @@ jobs:
101122
environment-name: test
102123
cache-downloads: true
103124
create-args: python=${{ matrix.PYTHON_VERSION }}
125+
104126
- name: Install additional dependencies
105127
shell: bash -l {0}
106128
run: bash -l .github/scripts/install.sh
129+
107130
- name: Show test environment
108131
shell: bash -l {0}
109132
run: |
110133
conda info
111134
conda list
135+
112136
- name: Run file tests
113137
shell: bash -l {0}
114138
run: xvfb-run --auto-servernum .github/scripts/modules_test.sh || xvfb-run --auto-servernum .github/scripts/modules_test.sh
115-
# Uncomment this to debug the CI job
116-
# - name: Setup tmate session
117-
# if: ${{ failure() }}
118-
# uses: mxschmitt/action-tmate@v3

.github/workflows/test-linux.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -76,35 +76,37 @@ jobs:
7676
fail-fast: false
7777
matrix:
7878
INSTALL_TYPE: ['pip', 'conda']
79-
PYTHON_VERSION: ['3.8', '3.10']
79+
PYTHON_VERSION: ['3.9', '3.10', '3.12']
8080
TEST_TYPE: ['fast', 'slow']
81-
exclude:
82-
# Only test Python 3.8 with pip because Conda-forge will drop it soon
83-
- INSTALL_TYPE: 'conda'
84-
PYTHON_VERSION: '3.8'
8581
timeout-minutes: 90
82+
8683
steps:
8784
- name: Setup Remote SSH Connection
8885
if: env.ENABLE_SSH == 'true'
8986
uses: mxschmitt/action-tmate@v3
9087
timeout-minutes: 60
9188
with:
9289
detached: true
90+
9391
- name: Checkout Pull Requests
9492
if: github.event_name == 'pull_request'
9593
uses: actions/checkout@v4
9694
with:
9795
ref: ${{ github.event.pull_request.head.sha }}
96+
9897
- name: Checkout Push
9998
if: github.event_name != 'pull_request'
10099
uses: actions/checkout@v4
100+
101101
- name: Fetch branches
102102
run: git fetch --prune --unshallow
103+
103104
- name: Install dependencies
104105
shell: bash
105106
run: |
106107
sudo apt-get update --fix-missing
107108
sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing
109+
108110
- name: Cache conda
109111
uses: actions/cache@v4
110112
env:
@@ -113,11 +115,13 @@ jobs:
113115
with:
114116
path: ~/conda_pkgs_dir
115117
key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }}
118+
116119
- name: Cache pip
117120
uses: actions/cache@v4
118121
with:
119122
path: ~/.cache/pip
120123
key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }}
124+
121125
- name: Create conda test environment
122126
if: env.USE_CONDA == 'true'
123127
uses: mamba-org/setup-micromamba@v1
@@ -127,6 +131,7 @@ jobs:
127131
environment-name: test
128132
cache-downloads: true
129133
create-args: python=${{ matrix.PYTHON_VERSION }}
134+
130135
- name: Create pip test environment
131136
if: env.USE_CONDA != 'true'
132137
uses: mamba-org/setup-micromamba@v1
@@ -138,31 +143,37 @@ jobs:
138143
condarc: |
139144
channels:
140145
- conda-forge
146+
141147
- name: Install additional dependencies
142148
shell: bash -l {0}
143149
run: bash -l .github/scripts/install.sh
150+
144151
- name: Show conda test environment
145152
if: env.USE_CONDA == 'true'
146153
shell: bash -l {0}
147154
run: |
148155
micromamba info
149156
micromamba list
157+
150158
- name: Show pip test environment
151159
if: env.USE_CONDA != 'true'
152160
shell: bash -l {0}
153161
run: |
154162
micromamba info
155163
micromamba list
156164
pip list
165+
157166
- name: Run manifest checks
158167
shell: bash -l {0}
159168
run: check-manifest
169+
160170
- name: Run tests with gdb
161171
if: env.USE_GDB == 'true'
162172
shell: bash -l {0}
163173
env:
164174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165175
run: xvfb-run --auto-servernum gdb -return-child-result -batch -ex r -ex py-bt --args python runtests.py -s
176+
166177
- name: Run tests
167178
shell: bash -l {0}
168179
env:
@@ -173,6 +184,7 @@ jobs:
173184
.github/scripts/run_tests.sh || \
174185
.github/scripts/run_tests.sh || \
175186
.github/scripts/run_tests.sh
187+
176188
- name: Coverage
177189
uses: codecov/codecov-action@v4
178190
with:

.github/workflows/test-mac.yml

+13
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,28 @@ jobs:
7878
PYTHON_VERSION: ['3.11']
7979
TEST_TYPE: ['fast', 'slow']
8080
timeout-minutes: 90
81+
8182
steps:
8283
- name: Setup Remote SSH Connection
8384
if: env.ENABLE_SSH == 'true'
8485
uses: mxschmitt/action-tmate@v3
8586
timeout-minutes: 60
8687
with:
8788
detached: true
89+
8890
- name: Checkout Pull Requests
8991
if: github.event_name == 'pull_request'
9092
uses: actions/checkout@v4
9193
with:
9294
ref: ${{ github.event.pull_request.head.sha }}
95+
9396
- name: Checkout Push
9497
if: github.event_name != 'pull_request'
9598
uses: actions/checkout@v4
99+
96100
- name: Fetch branches
97101
run: git fetch --prune --unshallow
102+
98103
- name: Cache conda
99104
uses: actions/cache@v4
100105
env:
@@ -103,16 +108,19 @@ jobs:
103108
with:
104109
path: ~/conda_pkgs_dir
105110
key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }}
111+
106112
- name: Cache pip
107113
uses: actions/cache@v4
108114
with:
109115
path: ~/Library/Caches/pip
110116
key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }}
117+
111118
- name: Install Miniconda
112119
uses: conda-incubator/setup-miniconda@v3
113120
with:
114121
auto-activate-base: false
115122
python-version: ${{ matrix.PYTHON_VERSION }}
123+
116124
- name: Create conda test environment
117125
uses: mamba-org/setup-micromamba@v1
118126
with:
@@ -121,17 +129,21 @@ jobs:
121129
environment-name: test
122130
cache-downloads: true
123131
create-args: python=${{ matrix.PYTHON_VERSION }}
132+
124133
- name: Install additional dependencies
125134
shell: bash -l {0}
126135
run: bash -l .github/scripts/install.sh
136+
127137
- name: Show test environment
128138
shell: bash -l {0}
129139
run: |
130140
micromamba info
131141
micromamba list
142+
132143
- name: Run manifest checks
133144
shell: bash -l {0}
134145
run: check-manifest
146+
135147
- name: Run tests
136148
shell: bash -l {0}
137149
env:
@@ -142,6 +154,7 @@ jobs:
142154
.github/scripts/run_tests.sh || \
143155
.github/scripts/run_tests.sh || \
144156
.github/scripts/run_tests.sh
157+
145158
- name: Coverage
146159
uses: codecov/codecov-action@v4
147160
with:

0 commit comments

Comments
 (0)