Skip to content

Commit cffd006

Browse files
author
Release Manager
committed
sagemathgh-36694: CI conda: On `pull_request`, only run 1 macOS job and 1 Linux job <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> as discussed in sagemath#36678 (comment), sagemath#36616 (comment) On pushes to a tag, all 3 Linux and 3 macOS jobs are still run, as demonstrated in https://github.com/mkoeppe/sage/actions/runs/6829619271 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> After merging, the branch protection rule https://github.com/sagemath/sa ge/settings/branch_protection_rules/33965567 will need to be updated. It controls what workflows show as "Required" in the PR Checks. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36694 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Tobias Diez
2 parents bb9349f + a49a7c1 commit cffd006

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/ci-conda.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,26 @@ jobs:
2222

2323
strategy:
2424
matrix:
25-
os: [ubuntu, macos]
26-
python: ['3.9', '3.10', '3.11']
25+
# On pushes to tags or branches, test the whole matrix.
26+
os: >-
27+
${{ github.event_name == 'pull_request'
28+
&& fromJson('["ubuntu"]')
29+
|| fromJson('["ubuntu", "macos"]') }}
30+
python: >-
31+
${{ github.event_name == 'pull_request'
32+
&& fromJson('["3.9"]')
33+
|| fromJson('["3.9", "3.10", "3.11"]') }}
2734
# Optional environment is disabled for now as its not yet working
2835
# environment: [environment, environment-optional]
2936
conda-env: [environment]
37+
# On pull requests, only test two jobs:
38+
# Ubuntu with Python 3.9, macOS with Python 3.10.
39+
# Build & Test currently uses Python 3.11 (on ubuntu-focal).
40+
# Together, they cover the supported minor Python versions.
41+
include: >-
42+
${{ github.event_name == 'pull_request'
43+
&& fromJson('[{"os": "macos", "python": "3.10", "conda-env": "environment"}]')
44+
|| fromJson('[]') }}
3045
3146
steps:
3247
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)