Skip to content

Commit d052b07

Browse files
authored
ci: add testing with minimal requirements (#2105)
1 parent 198314e commit d052b07

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/cpu-tests.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020

2121
concurrency:
2222
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
23-
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}
23+
cancel-in-progress: ${{ startsWith(github.event_name, 'pull_request') }}
2424

2525
defaults:
2626
run:
@@ -79,9 +79,11 @@ jobs:
7979
matrix:
8080
os: ["ubuntu-22.04"]
8181
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
82+
requires: ["latest"]
8283
include:
83-
- { os: "macOS-14", python-version: "3.10" }
84-
- { os: "windows-2022", python-version: "3.10" }
84+
- { os: "ubuntu-22.04", python-version: "3.9", requires: "oldest" }
85+
- { os: "windows-2022", python-version: "3.10", requires: "latest" }
86+
- { os: "macOS-14", python-version: "3.10", requires: "latest" }
8587
timeout-minutes: 35
8688
steps:
8789
- name: Checkout generic
@@ -95,8 +97,8 @@ jobs:
9597
- uses: actions/setup-python@v5
9698
with:
9799
python-version: ${{ matrix.python-version }}
98-
cache: "pip"
99100
cache-dependency-path: pyproject.toml
101+
cache: "pip"
100102

101103
# Add caching for HF models and tokenizers
102104
- name: HF cache
@@ -110,6 +112,11 @@ jobs:
110112
hf-cache_${{ runner.os }}-
111113
hf-cache_
112114
115+
- name: Set min. dependencies
116+
if: matrix.requires == 'oldest'
117+
run: |
118+
pip install 'lightning-utilities[cli]>=0.15.1'
119+
python -m lightning_utilities.cli requirements set-oldest --req_files=pyproject.toml
113120
- name: Install dependencies
114121
run: |
115122
pip install '.[extra,compiler,test]' -U

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ classifiers = [
2626
]
2727
dependencies = [
2828
# download models:
29-
"huggingface-hub>=0.23.5,<0.33",
30-
"jsonargparse[signatures]>=4.30.1,<=4.32.1; python_version<='3.9'", # 4.33 does not seem to be compatible with Python 3.9
31-
"jsonargparse[signatures]>=4.37; python_version>'3.9'", # required to work with python3.12+
29+
"huggingface-hub>=0.30,<0.33",
30+
"jsonargparse[signatures]>=4.31,<=4.32.1; python_version<'3.10'", # 4.33 does not seem to be compatible with Python 3.9
31+
"jsonargparse[signatures]>=4.37; python_version>'3.9'", # required to work with python3.12+
3232
"lightning>=2.5",
3333
"psutil==7",
3434
"safetensors>=0.4.3",
3535
# tokenization in most models:
36-
"tokenizers>=0.15.2",
37-
"torch>=2.5",
36+
"tokenizers>=0.21",
37+
"torch>=2.6",
3838
# convert_hf_checkpoint
39-
"tqdm>=4.66",
39+
"tqdm>4.66",
4040
]
4141

4242
optional-dependencies.compiler = [

0 commit comments

Comments
 (0)